You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Baltasar Trancon Widemann (Jira)" <ji...@apache.org> on 2020/02/19 09:19:00 UTC
[jira] [Created] (GROOVY-9409)
org.codehaus.groovy.runtime.callsite.GroovySunClassLoader is unusable
Baltasar Trancon Widemann created GROOVY-9409:
-------------------------------------------------
Summary: 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
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)