You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/02/20 14:11:00 UTC
[jira] [Comment Edited] (GROOVY-9409)
org.codehaus.groovy.runtime.callsite.GroovySunClassLoader is unusable
[ https://issues.apache.org/jira/browse/GROOVY-9409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040883#comment-17040883 ]
Paul King edited comment on GROOVY-9409 at 2/20/20 2:10 PM:
------------------------------------------------------------
Nice detective work. I found that {{ClassReader.SKIP_CODE}} gave the same result for me. Using 0 made your example pass. I think {{SKIP_DEBUG}} is what was originally intended looking back at the history.
was (Author: paulk):
Nice detective work. I found that {{ClassReader.SKIP_CODE}} gave the same result for me. Using 0 made your example pass. We could possibly get away with {{SKIP_DEBUG}} but I am inclined to leave it with the 0 value.
> org.codehaus.groovy.runtime.callsite.GroovySunClassLoader is unusable
> ---------------------------------------------------------------------
>
> Key: GROOVY-9409
> URL: https://issues.apache.org/jira/browse/GROOVY-9409
> Project: Groovy
> Issue Type: Bug
> Components: bytecode
> Affects Versions: 3.0.0
> Environment: OpenJDK 8u222
> Reporter: Baltasar Trancon Widemann
> Priority: Major
> Attachments: Example.java
>
>
> The singleton class loader supposedly defined by {{org.codehaus.groovy.runtime.callsite.GroovySunClassLoader}} cannot be used. The creation of the instance fails with a {{ClassFormatError}}. The attached Java code demonstrates the issue:
> {noformat}
> $ javac -classpath $HOME/.m2/repository/org/codehaus/groovy/groovy/3.0.0/groovy-3.0.0.jar Example.java
> $ java -classpath .:$HOME/.m2/repository/org/codehaus/groovy/groovy/3.0.0/groovy-3.0.0.jar Example
> GroovySunClassLoader.sunVM = null
> Creating a new GroovySunClassLoader ...
> Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file org/codehaus/groovy/runtime/callsite/AbstractCallSite
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
> at org.codehaus.groovy.reflection.SunClassLoader.define(SunClassLoader.java:95)
> at org.codehaus.groovy.runtime.callsite.GroovySunClassLoader.loadAbstract(GroovySunClassLoader.java:69)
> at org.codehaus.groovy.runtime.callsite.GroovySunClassLoader.<init>(GroovySunClassLoader.java:51)
> at Example$1.<init>(Example.java:7)
> at Example.main(Example.java:7)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)