Ethan Zhang created GROOVY-7408:
-----------------------------------
Summary: Reflection failed when the system time is before the last
modified time of the groovy script
Key: GROOVY-7408
URL: https://issues.apache.org/jira/browse/GROOVY-7408
Project: Groovy
Issue Type: Bug
Components: GroovyScriptEngine
Affects Versions: 2.4.1, 1.8.3
Environment: redhat 6.0
Reporter: Ethan Zhang
Hi,
I use GroovyScriptEngine to run a groovy script from java program. Inside the
groovy script, I use Class.forName to load another groovy class. However, if
the operating system time is behind the groovy file last modified time,
following exception will be thrown:
java.lang.NoSuchMethodException: scripts.A.<init>(scripts.A, java.lang.String,
java.lang.String, java.lang.String)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at java_lang_Class$getConstructor$1.call(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
at scripts.B.create(B.groovy:41)
at scripts.B$create.call(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
at scripts.enrich.run(enrich.groovy:38)
at groovy.util.GroovyScriptEngine.run(GroovyScriptEngine.java:589)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)