|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Commented: (JANINO-31) IncompatibleClassChangeError when loading nested classes[ http://jira.codehaus.org/browse/JANINO-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179522#action_179522 ] Matt Fowles commented on JANINO-31: ----------------------------------- You can find a fixed version of this at http://code.google.com/p/janino-streambase/ I did not test this on jrockit; however, I did run it through StreamBase's nightly tests in addition to the ones provided by Janino. > IncompatibleClassChangeError when loading nested classes > -------------------------------------------------------- > > Key: JANINO-31 > URL: http://jira.codehaus.org/browse/JANINO-31 > Project: Janino > Issue Type: Bug > Environment: BEA jrockit81sp3_142_04 > Janino 2.3.7 > Reporter: kdx > Assignee: Arno Unkrig > Priority: Critical > Attachments: atd.patch, ExecutableStmt.java, janinoc-incompatibleclasschangeerror-testcase.zip > > > Such a class: > public class Function_0 { > public static class PrintX { > public static void printX() { > System.err.println("x"); > } > } > } > when compiled by Janino and the resulting class files loaded via the ByteArrayClassLoader like this: > ByteArrayClassLoader bacl = new ByteArrayClassLoader(classes, parent); > Class clazz = bacl.loadClass(classNames[0]); > System.err.println(clazz.getDeclaredClasses()); > results in a verification error on BEA's jrockit81sp3_142_04 JVM: > java.lang.IncompatibleClassChangeError: Function_0$PrintX > at java.lang.Class.getDeclaredClasses0(I)[Ljava.lang.Class;(Unknown Source) > at java.lang.Class.getDeclaredClasses(I)[Ljava.lang.Class;(Unknown Source) > at Main.main([Ljava.lang.String;)V(Main.java:45) > And seems to work fine on Sun's j2sdk1.4.2_04: > [Ljava.lang.Class;@206c555 > BEA's website claims that JRockit performs stricter type checks than Sun's JVM, see "Why is JRockit throwing a ClassFormatError, IncompatibleClassChangeError or other LinkageError exceptions when the Sun JVM is not?" at http://e-docs.bea.com/wljrockit/docs81/dev_faq.html > The attached source, when compiled by Sun's j2sdk1.4.2_04, runs fine both on the Sun j2sdk1.4.2_04 and BEA jrockit81sp3_142_04 JVMs. When compiled by Janino 2.3.7, it runs fine on the Sun j2sdk1.4.2_04 JVM, but not, as said above, on BEA jrockit81sp3_142_04. > To verify that it is only the nested classes that cause the problem, the Main.class may be overwritten with a Sun-compiled version (while keeping the Function_0*.class files Janino-compiled) and the IncompatibleClassChangeError still happens. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |