Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.4
-
None
Description
Example:
import java.lang.*
This causes:
... Caused by: javax.script.ScriptException at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:306) at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:113) ... 92 more Caused by: java.lang.NullPointerException at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:253)
The reason is that GroovyScriptEngineImpl.getScriptClass() returns null in this case (I tried to understand why but couldn't).
Since it's null the eval() method fails at line 253.
Note that there was another error hiding this error, this time caused by livetribe, which is now fixed in livetribe 2.0.6. You can see more information here:
http://jira.xwiki.org/jira/browse/XWIKI-4246
Thanks