How to use Moxy [message #1118345] |
Fri, 27 September 2013 10:09  |
Eclipse User |
|
|
|
Just wanted to start using Moxy and trying things described on page:
http://www.eclipse.org/eclipselink/documentation/2.5/moxy/dynamic_jaxb003.htm
Using Maven, I add a dependency:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
<version>2.5.0</version>
</dependency>
This pulls in core, asm, antlr as well. So far, so good.
When calling DynamicJAXBContextFactory.createContextFromXSD(...) however I am getting a
java.lang.ClassNotFoundException: org.eclipse.persistence.jaxb.dynamic.metadata.SchemaMetadata
That's baffling. The "org.eclipse.persistence.jaxb.dynamic.metadata" package belongs to the
"org.eclipse.persistence.moxy" artifact, so how come SchemaMetadata.class is not in the artifact?
|
|
|
Re: How to use Moxy [message #1118706 is a reply to message #1118345] |
Fri, 27 September 2013 17:43  |
Eclipse User |
|
|
|
Hello Martin,
This has actually exposed a bug in our Maven support, some dependencies are not present for the moxy artifact. I've entered a bug to track this here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=418207
To work around this, you will need to change your dependency to include the full eclipselink artifact, and also include a dependency to the required xjc tools:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.5.0</version>
<exclusions>
<exclusion>
<artifactId>commonj.sdo</artifactId>
<groupId>commonj.sdo</groupId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
<version>1.1.1</version>
</dependency>
Thanks for bringing this to our attention,
Rick
|
|
|
Powered by
FUDForum. Page generated in 0.05248 seconds