Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JAXB unable to compile generated package

843834Jan 5 2004 — edited Jan 16 2004
following the tutorial I ran xjc.sh on my xsd file generating a package with a -p option.

when I ran javac user/*.java /usr/impl/*.java I received 100 error message all basicly complaining about missing classes

ex:
user/impl/UserDataImpl.java:13: package com.sun.xml.bind does not exist
implements user.UserData, com.sun.xml.bind.RIElement, com.sun.xml.bind.JAXBObject, user.impl.runtime.UnmarshallableObject, user.impl.runtime.XMLSerializable, user.impl.runtime.ValidatableObject

user/impl/UserDataTypeImpl.java:11: package com.sun.xml.bind does not exist
public class UserDataTypeImpl implements user.UserDataType, com.sun.xml.bind.JAXBObject, user.impl.runtime.UnmarshallableObject, user.impl.runtime.XMLSerializable, user.impl.runtime.ValidatableObject

how do I fix this? where do I find sun.com.xml and other related packages could my xaxb.properties have anything to do with this?
Here it is:
#Sun Jan 04 22:52:08 EST 2004
javax.xml.bind.context.factory=com.sun.xml.bind.ContextFactory_1_0_1
com.sun.xml.bind.jaxbContextImpl=user.impl.runtime.DefaultJAXBContextImpl

I am using the web services development pack version 1.3

here's my xsd file

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="userData" type="userDataType"/>

<xsd:complexType name="userDataType">
<xsd:sequence>
<xsd:element name="userInfo" type="userInfoType" minOccurs="1" m
axOccurs="1"/>
<xsd:element name="buddy" type="buddyType" minOccurs="0" maxOccu
rs="unbounded"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="userInfoType">
<xsd:sequence>
<xsd:element name="userID" type="xsd:unsignedShort"/>
<xsd:element name="userName" type="xsd:string"/>
<xsd:element name="hashedPW" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="buddyType">
<xsd:sequence>
<xsd:element name="userID" type="xsd:unsignedShort"/>
<xsd:element name="userName" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

</xsd:schema>

drop a line if yo have any idea as to how to fix this
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2004
Added on Jan 5 2004
7 comments
396 views