Community
Participate
Working Groups
I get a VerifyError every time I try to create a new instance of a specific class. The class that j9 does not like is actually a token manager generated by the JavaCC tool. When -Xj9 switch is not used, there is no problem and the VerifyError does not occur. The version information is as follows... Eclipse Version: 3.0.0, Build id: 200405140800 ... and the partial stack trace is provided at the end. You'll probably want have a look at Bugzilla Bug 42692 "JavaCC files cause VerifyError when compiled with Eclipse." However, 42692 indicates that it has been fixed in Oct 2003. Please let me know if this is a known problem, or if you need more information to reproduce the problem. Thanks! -- java.lang.VerifyError at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at java.lang.VerifyError.<init>(VerifyError.java:48) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java) at org.eclipse.osgi.framework.internal.defaultadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java) at org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineClass(EclipseClassLoader.java) at org.eclipse.osgi.framework.internal.defaultadaptor.DefaultClassLoader.findClassImpl(DefaultClassLoader.java) at org.eclipse.osgi.framework.internal.defaultadaptor.DefaultClassLoader.findClass(DefaultClassLoader.java) at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.findLocalClass(AbstractClassLoader.java) at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass(EclipseClassLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java) at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java)
We need more information to reproduce the problem. Please attach an example of a file which would reproduce this issue.
Please reopen once reproducing steps are available.
Created attachment 13363 [details] The automatically generated JavaCC token manager The VerifyError that occurs with the -Xj9 flag on can be reproduced using the attached JavaCC generated file (XQueryTokenManager.java). Thic file has one particularly big method (jjMoveNfa_0), that contained a large number of conditional branches (something like 700 case statements, as well as if/else branches). The workaround solution is to move one large switch statement containing some 200 cases into a different method, using parameters and class fields to marshal the local variables. The new code is functionally the same as before. However, if someone re-generates the parser code, the problem will occur again.
Please see the attcahed file for more information.
Could you please provide the class XQueryConstants and the class SimpleCharStream? I'd like to be able to compile your exact test case?
Created attachment 13536 [details] Standalone java file that can be compiled VerifyError.java is the stand-alone source code that reproduces this defect. VerifyError.class is the resulting class file compiled by Eclipse 3.0. The test can be executed from the command line by typing "java -Xj9 VerifyTest". The resulting message will be "The java class could not be loaded. java.lang.VerifyError". If the same is attempted without the -Xj9 switch, no error occurs.
Created attachment 13537 [details] Class file
I will investigate.
This is due to a bug in the J9 VM. It has nothing to do with the Eclipse .class file. Closing as INVALID. The bug has been reported against the J9 VM. Future version of the J9 VM should fix it.
"The bug has been reported against the J9 VM. Future version of the J9 VM should fix it." Could you please provide the J9 bug name/number so I can check its status?
VM bug. Closing as INVALID.