Grails 2.3 + Resources - NullPointerException

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails 2.3 + Resources - NullPointerException

sergiomichels
When changing a javascript file in a folder inside web-app I'm getting:

java.lang.NullPointerException: Cannot get property 'grailsResourceProcessor' on null object
at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:56)
at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:169)
at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at ResourcesGrailsPlugin$_closure4_closure20.doCall(ResourcesGrailsPlugin.groovy:211)
at ResourcesGrailsPlugin$_closure4_closure20.doCall(ResourcesGrailsPlugin.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:64)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at ResourcesGrailsPlugin$_triggerReload_closure7.doCall(ResourcesGrailsPlugin.groovy:198)
at ResourcesGrailsPlugin$_triggerReload_closure7.doCall(ResourcesGrailsPlugin.groovy)

Anyone seeing this?


--
Sérgio Michels
Reply | Threaded
Open this post in threaded view
|

Re: Grails 2.3 + Resources - NullPointerException

Kimble
I'm experiencing the same with Grails 2.3.2.
 - Kim A. Betti
Have a nice day!
Reply | Threaded
Open this post in threaded view
|

Re: Grails 2.3 + Resources - NullPointerException

sezer.yilmaz
In reply to this post by sergiomichels
Same here with 2.3.4. Could anyone figure out the reason for that ?
Reply | Threaded
Open this post in threaded view
|

Re: Grails 2.3 + Resources - NullPointerException

houbie
This is caused by forked execution: there are two parallel onChange events fired, one in the app that runs successfully, and one in the starter jvm that fails because there is no spring context.

I submitted a pull request to avoid the NPE in the resources plugin, but it seems likely that other plugins will have similar problems in forked execution :(

Maybe there should be a distinction between both onChange events...

Grtz,
Ivo