Hello,

When running JIBX on Java 6 version 1.6.0_01 we got
the following error java.lang.IllegalAccessError:
tried to access method
app.test2.TestEnum.deserialize(Ljava/lang/String;)Lapp/test2/TestEnum.

After some testing, we discovered that if the
serialize/deserialize method are in the same package
as the class being unmarshalled, unmarshalling will be
successful.  Refactoring the methods to a different
package will cause the IllegalAccessError, even if the
serialize and deserialize methods are public. 
However, in Java 5, the package of the methods did not
cause the IllegalAccessError exception.  Can we get
JIBX fixed so that behavior in Java 6 is similar to
the behavior in Java 5?

This is a similar problem to the post titled
“IllegalAccessException when running on JRE 6.0” found
at
http://www.mail-archive.com/jibx-users@lists.sourceforge.net/msg02667.html

Here is the full text of the error
java.lang.IllegalAccessError: tried to access method
app.test2.TestEnum.deserialize(Ljava/lang/String;)Lapp/test2/TestEnum;
from class app.test.TestMap
            at
app.test.TestMap.JiBX_TESTMAP_unmarshal_1_0(TestMap.java)
            at
app.test.JiBX_TESTMAPTestMap_access1.unmarshal()
            at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2537)
            at
org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2680)
            at
app.test.JibxTest.unmarshall(JibxTest.java:76)
            at
app.test.JibxTest.testMsgBinding3(JibxTest.java:55)
            at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
            at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at
java.lang.reflect.Method.invoke(Method.java:597)
            at
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
            at
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
            at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
            at
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
            at
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
            at
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
            at
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
            at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
            at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
            at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
            at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
            at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
            at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Thanks,

Jennifer






       
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to