|
|
Re: Unable to generate JAXB classes [message #804471 is a reply to message #804446] |
Wed, 22 February 2012 17:01 |
Terry Birch Messages: 14 Registered: May 2010 Location: SC |
Junior Member |
|
|
Thanks Neil.
I have to use 1.6 in my projects properties because of the system I will be deploying to. I just tried switching the eclipse preferences jre option from 1.6. to 1.7 and still get the same error.Here is the console output when trying to generate the jaxb classes:
java.lang.NoClassDefFoundError: java/util/Arrays/useLegacyMergeSort=true
Caused by: java.lang.ClassNotFoundException: java.util.Arrays.useLegacyMergeSort=true
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"
I am using jaxb-api-2.2.jar and jaxb-impl--2.2.1.1.jar in my project libraries.
[Updated on: Wed, 22 February 2012 19:12] Report message to a moderator
|
|
|
|
Re: Unable to generate JAXB classes [message #805307 is a reply to message #804471] |
Thu, 23 February 2012 16:03 |
Neil Hauge Messages: 475 Registered: July 2009 |
Senior Member |
|
|
It sounds like there might be some cached settings that are causing a problem, but I think we should make sure this workaround is reasonable. Running JAXB 2.2 in Java 1.6 can be problematic, and requires special JRE configuration. As long as you are generating 2.2 classes in Dali, and running 2.2 in production, that should be OK, but running newer JAXB generated code in older (1.6 embedded JAXB 2.1) could cause problems.
Dali will recreate the launch config with each run, so that would explain why your changes aren't sticking around. Dali will use the execution environment specified for the particular project it is running in, so I assume that it is set to 1.6 in this case, and as a result we will use 1.6. This is because as I mentioned before, the generation is sensitive to JDK and JAXB levels. Since you are actually trying to use JAXB 2.2 libs, they may have a runtime dependency on Java 7, which perhaps results in the error you are seeing when running against 1.6.
Neil
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02271 seconds