clarkdave/play-groovy — Issue #3: The groovy plugin throws an exception at application startup
Author: paoloditommaso
Created: 2011-12-27 12:09:59+00:00
State: open

I've installed the groovy module and created an Play app with groovy option. Starting the application the following exception is thrown

```
00:30:16,979 INFO ~ Starting /Users/ptommaso/workspace/groovyapp
00:30:16,983 INFO ~ Module groovy is available (/Users/ptommaso/tools/play-1.2.3/modules/groovy-0.1)
00:30:17,938 INFO ~ Groovy support is active
00:30:17,939 WARN ~ You're running Play! in DEV mode
~
~ Go to http://localhost:9000/@tests to run the tests
~
00:30:18,024 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...
Not sure what to do with this source. This is probably a bug
Not sure what to do with this source. This is probably a bug
00:30:29,568 ERROR ~

@68p05a770
Internal Server Error (500) for request GET /

Oops: NullPointerException
An unexpected error occured caused by exception NullPointerException: Cannot invoke method refresh() on null object

play.exceptions.UnexpectedException: Unexpected Error
at play.Play.start(Play.java:525)
at play.Play.detectChanges(Play.java:610)
at play.Invoker$Invocation.init(Invoker.java:186)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException: Cannot invoke method refresh() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at play.groovysupport.GroovyPlugin$_updateJava_closure10.doCall(GroovyPlugin.groovy:242)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at groovy.lang.Closure.call(Closure.java:410)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3374)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1406)
at org.codehaus.groovy.runtime.dgm$143.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at play.groovysupport.GroovyPlugin.updateJava(GroovyPlugin.groovy:215)
at play.groovysupport.GroovyPlugin$updateJava.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at play.groovysupport.GroovyPlugin.compileSources(GroovyPlugin.groovy:101)
at play.plugins.PluginCollection.compileSources(PluginCollection.java:349)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:397)
at play.Play.start(Play.java:485)
```