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
Comments
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 |
No , I haven't tried the test project , I tried in my own project, This is what I did , |
Where are your Jobs, in the project, or the plugin? |
My Jobs are in plugin .. |
Issue #29 and this one are duplicates. Closing this one. |
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 ???
The text was updated successfully, but these errors were encountered: