JAXB schema undefined types
843834Apr 7 2004 — edited Nov 28 2006Hi,
I wrote a schema based on xml data that I want JAXB to generate classes for. This schema contains elements of type string, date, and integer. A sample looks like:
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:element name="recordedDate" type="xsd:date"/>
<xsd:element name="longOID" type="xsd:integer"/>
...
Running xjc works like a charm--generating all the necessary classes. Then when I actually try to unmarshal some sample xml data, I run into this error:
"Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/msv/datatype/xsd/DateType"
When I changed my schema to have the element recordedDate use type="string" instead, I get a similar error targeting the integer type. So having change all the types to "string" in my schema, the xml data was unmarshalled correctly.
I checked for classpath issues and I made sure to include every jar from jaxb folder as well as the jws/shared folder. So I'm not exactly sure why I'm getting no class definition errors for every element type except string. Any help would be appreciated. Thanks!
-los