Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [Fwd: Cannot get MOXy to work]

Hi Roger,

This is also a good question for the Dali Java Persistence Tools forum:

http://www.eclipse.org/forums/index.php?t=thread&frm_id=113

For more on Dali - http://www.eclipse.org/webtools/dali/

There are a couple of core libraries that need to be in your classpath at the project or system level in order to generate classes from schema in Helios.  These include:

com.sun.tools.xjc_2.2.0.jar
com.sun.xml.bind_2.2.0.v201004141950.jar

This would solve the problem of generic JAXB class generation.  This doesn't appear to be the cause of your MOXy based generation though.   You are correct that the MOXyXJC class does not appear to be in the org.eclipse.moxy bundle, and I would have thought it should be there.  I'm investigating this with the MOXy team and will let you know what we discover. 

For now you could do the generic JAXB class generation and manually place the jaxb.properties into the generated package, and this should emulate the result you would get with the MOXyXJC based generation.

Another possible workaround would be to use the eclipselink.jar, as this contains all of MOXy, including the MOXyXJC class.  You can easily set up a library with the eclipselink.jar by using the Downloadable Library feature from the Java Persistence project properties page.  This can be seen by setting the JPA Implementation Type to "User Library".  Look for the disk icon to the right of this area and select for a list of available pre packaged Eclipse Libraries that are available for download.

Neil

Subject:
[eclipselink-users] Cannot get MOXy to work
From:
RogerV <roger.varley@xxxxxxxxxxxxxx>
Date:
Mon, 6 Dec 2010 01:52:03 -0800 (PST)
To:
eclipselink-users@xxxxxxxxxxx

Hi

I'm using Eclipse Helios, JDK1.6 and I'm trying to create Java classes from
a .xsd file using Moxy. I have added
org.eclipse.moxy-2.1.1.v20100817-r8050.jar to my project build path (when I
check the Persistence facet of my project, although EclipseLInk 2.1.1 is
specified, this jar doesn't appear automatically).

I have created the jaxb.properties file in the same directory as my .xsd
file as detailed in the wiki at
wiki.eclipse.org/EclipseLInk/Examples/MOXy/JAXB/SpecifyRuntime.

However when I right click my .xsd file and select Generate -> JAXB Classes,
the dialog complains that it cannot find a JAXB implementation on the
classpath. If I tick the checklbox Use Moxy as JAXB implementation and
continue I get a ClassNotFoundException
org.eclipse.persistence.jaxb.xjc.MOXyXJC. Looking inside
org.eclipse.moxy-2.1.1.v20100817-r8050.jar the xjc package is not present.

Where do I find this class, or have I missed something in the setup

Regards
-- View this message in context: http://old.nabble.com/Cannot-get-MOXy-to-work-tp30366693p30366693.html Sent from the EclipseLink - Users mailing list archive at Nabble.com. _______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top