[ https://issues.apache.org/jira/browse/GROOVY-9493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17072000#comment-17072000 ]
Danilo Pianini commented on GROOVY-9493: ---------------------------------------- Note: it may be a combined issue involving also Kotest, as I can reproduce it only using OpenJ9 + Kotest + Groovy JSR 223. > JSR 223 regression: not working under OpenJ9 since version 3.0.0 > ---------------------------------------------------------------- > > Key: GROOVY-9493 > URL: https://issues.apache.org/jira/browse/GROOVY-9493 > Project: Groovy > Issue Type: Bug > Components: JSR / TCK / GLS > Affects Versions: 3.0.0, 3.0.1, 3.0.2 > Reporter: Danilo Pianini > Priority: Major > > Since version 3.0.0, Groovy fails at running JSR 233 scripts under OpenJ9. > The issue does not appear under OpenJDK. > > The following is the result of the attempted evaluation of the script `1` > under OpenJ9 12. The failure is reproducible with OpenJ9 11 and OpenJ9 14. > Inside `GroovyScriptEngineImpl`, parameter `script` has value `"1"` (meaning > a string of length 1 with the sole number 1 as content). > > ``` > java.lang.NullPointerExceptionjava.lang.NullPointerException at > groovy.lang.GroovyClassLoader$InnerLoader.setDefaultAssertionStatus(GroovyClassLoader.java:617) > at > java.base/java.lang.ClassLoader.initializeClassLoaderAssertStatus(ClassLoader.java:1990) > at java.base/java.lang.ClassLoader.<init>(ClassLoader.java:344) at > java.base/java.lang.ClassLoader.<init>(ClassLoader.java:284) at > java.base/java.security.SecureClassLoader.<init>(SecureClassLoader.java:77) > at java.base/java.net.URLClassLoader.<init>(URLClassLoader.java:232) at > groovy.lang.GroovyClassLoader.<init>(GroovyClassLoader.java:158) at > groovy.lang.GroovyClassLoader.<init>(GroovyClassLoader.java:147) at > groovy.lang.GroovyClassLoader$InnerLoader.<init>(GroovyClassLoader.java:472) > at > groovy.lang.GroovyClassLoader.lambda$createCollector$4(GroovyClassLoader.java:671) > at groovy.lang.GroovyClassLoader$$Lambda$397.00000000283EE5D0.run(Unknown > Source) at > java.base/java.security.AccessController.doPrivileged(AccessController.java:678) > at groovy.lang.GroovyClassLoader.createCollector(GroovyClassLoader.java:671) > at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:385) at > groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332) > at groovy.lang.GroovyClassLoader$$Lambda$345.00000000284B4BF0.provide(Unknown > Source) at > org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163) > at > org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154) > at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330) at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:314) at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:257) at > org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:336) > at > org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:153) > at > java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) > at > it.unibo.alchemist.loader.variables.JSR223Variable.getWith(JSR223Variable.kt:39) > at it.unibo.alchemist.loader.YamlLoader.<init>(YamlLoader.java:287) at > it.unibo.alchemist.loader.YamlLoader.<init>(YamlLoader.java:220) at > it.unibo.alchemist.SimulationLauncher.launch(SimulationLauncher.kt:42) at > it.unibo.alchemist.Launcher$DefaultImpls.invoke(Launcher.kt:20) at > it.unibo.alchemist.SimulationLauncher.invoke(SimulationLauncher.kt:27) at > it.unibo.alchemist.Alchemist.main(Alchemist.kt:115) at > TestCLIKt$runWithOptions$exit$1.invoke(TestCLI.kt:48) at > TestCLIKt$runWithOptions$exit$1.invoke(TestCLI.kt) at > TestCLIKt.runCatchingExit(TestCLI.kt:38) at > TestCLIKt.runWithOptions(TestCLI.kt:47) at > TestCLI$1$2.invokeSuspend(TestCLI.kt:69) at TestCLI$1$2.invoke(TestCLI.kt) at > io.kotlintest.runner.jvm.TestCaseExecutor$executeTest$supervisorJob$1$invokeSuspend$$inlined$map$lambda$1.invokeSuspend(TestCaseExecutor.kt:121) > at > kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) > at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56) at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > at java.base/java.lang.Thread.run(Thread.java:831) > ``` -- This message was sent by Atlassian Jira (v8.3.4#803005)