Migrate RCP to Java11 using MOXy [message #1800703] |
Sun, 06 January 2019 09:38  |
Frank Benoit Messages: 179 Registered: July 2009 |
Senior Member |
|
|
Hi
I try to migrate a Eclipse RCP application to run on Java 11 (before Java 8).
But with the xml unmarshalling, i have trouble.
I added some bundles to the target platform:
javax.activation (javax.activation-1.2.0.jar)
jaxb-api (jaxb-api-2.4.0-b180830.0359.jar)
In the dependencies I added:
Import-Package: com.sun.xml.bind;version="2.4.0",
javax.activation;version="1.2.0",
javax.xml.bind;version="[2.2.12,3.0.0)"
Then MOXy could not be seen on the classpath by javax.xml.bind.
So i changed the code to load MOXy directly:
JAXBContext.newInstance( castle.extdata.autosar.v4.ObjectFactory.class );
JAXBContextFactory.createContext( new Class[] { castle.extdata.autosar.v4.ObjectFactory.class }, null );
Now I get this new error:
[Exception [EclipseLink-25008] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: A descriptor with default root element {http://autosar.org/schema/r4.0}AUTOSAR was not found in the project]
As the project was working before, i guess it is not really an issue with the generated objects or data, more likely with the configuration.
Can someone help?
Or is there a runnable RCP example, using MOXy unmarshalling objects, running with Java11?
thanks
Frank
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02113 seconds