Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After WAR job beans are not getting loaded... #27

Closed
VigneshwaranK opened this issue Dec 9, 2014 · 5 comments
Closed

After WAR job beans are not getting loaded... #27

VigneshwaranK opened this issue Dec 9, 2014 · 5 comments

Comments

@VigneshwaranK
Copy link

After I did build war , job beans are not getting loaded and throwing null pointer exception for me , then I looked for reason , then I found this code
def loadBatchConfig = { ->
loadBeans 'classpath_:/batch/BatchConfig.groovy'
}
in SpringBatchGrailsPlugin.groovy , which looks for BatchConfig files in batch/ directory but while creating war those directory are not getting created , so I did a work around as given below
"eventCreateWarStart = { warName, stagingDir ->
ant.move(todir:"${stagingDir}/WEB-INF/classes/batch"){
fileset(dir:"${basedir}/grails-app/batch", includes:"*
/_BatchConfig.groovy") }}" ,

Is this excepted or is it bug ???

@danieldbower
Copy link
Collaborator

That is very peculiar. Does this happen in your environment when you try one of the test projects in the source code? They are located here: https://github.com/johnrengelman/grails-spring-batch/tree/master/test/projects

@VigneshwaranK
Copy link
Author

No , I haven't tried the test project , I tried in my own project, This is what I did ,
I used grails-spring-batch plugin in a plugin which I developed. Then I hooked that plugin into the main application which is where it is throwing the exception .

@danieldbower
Copy link
Collaborator

Where are your Jobs, in the project, or the plugin?

@VigneshwaranK
Copy link
Author

My Jobs are in plugin ..

@danieldbower
Copy link
Collaborator

Issue #29 and this one are duplicates. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants