[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Basic MOXy Question

I'm sure this is a pretty basic question but try as I might I can't seem to get around it.
 
I am trying to work thru the TopLink OXM example (http://www.oracle.com/technology/products/ias/toplink/technical/tips/ox/index.htm) using EclipseLink and try as I might, I keep getting the same exception each time...
 
"[Exception [EclipseLink-25008] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: A descriptor with default root element {urn:customer-example}customer was not found in the project]"
 
1. I've created a JAR containing the sample classes from the TopLink article.
2. I've walked thru all of the EclipseLink steps in the article with no apparent difficulties
 
My problem starts when I attempting to run the test code from the article.
 
The jar containing the sample classes is on the classpath, as are the following from EclipseLink:
eclipselink.jar
moxy/javax.activation_1.1.0.jar
moxy/javax.mail_1.4.0.jar
moxy/javax.xml.bind_2.0.0.jar
moxy/javax.xml.stream_1.0.0.jar
moxy/jaxb-impl.jar
moxy/jaxb-xjc.jar
 
In addition, the 'classes' directory from the EclipseLink sample project is on the classpath, containing the following:
examples
CustomerProject.xml
examples.ox.model.Address.xml
examples.ox.model.Customer.xml
examples.ox.model.PhoneNumber.xml
sessions.xml
 
The required jaxb.properties resides under the 'examples/ox/model' subdirectory above.
 
Exception is being thrown at the following line from the sample code:
Customer customer = (Customer) unmarshaller.unmarshal(file);
 
Any insight would be greatly appreciated!
 
Regards,
Bill