This message was originally submitted by runjhun1_at_YAHOO.COM to the
JAXB-INTEREST list at JAVA.SUN.COM. If you simply forward it back to the list,
using a mail command that generates "Resent-" fields (ask your local user
support or consult the documentation of your mail program if in doubt), it will
be distributed and the explanations you are now reading will be removed
automatically. If on the other hand you edit the contributions you receive into
a digest, you will have to remove this paragraph manually. Finally, you should
be able to contact the author of this message by using the normal "reply"
function of your mail program.
----------------- Message requiring your approval (34 lines) ------------------
since I wanted the generated classes to be serializable I modified my schema as follows
<xsd:schema xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="
http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="
http://java.sun.com/xml/ns/jaxb/xjc"
jaxb:extensionBindingPrefixes="xjc"
jaxb:version="1.0">
<xsd:annotation>
<xsd:appinfo>
<jaxb:globalBindings generateIsSetMethod="true">
<xjc:serializable uid="1"/>
</jaxb:globalBindings>
</xsd:appinfo>
</xsd:annotation>
.
.
.
</xsd:schema>
Then I ran the compiler with the following command
%JAXB_HOME%\bin\xj.bat -extension Computer2.xsd -p COMPUTER2
Then after I got the generated classes and I tried to say new Objectfactory() and I got following error
The file reader isjava.io.FileReader_at_685b8b98
[2/26/03 14:06:37:241 GMT] 28000b89 SystemOut O In createAddressFromString. The phoneString is work 123456 work 67856 cell 7869 home 56434 pager 675432the address string is 123 main street san-jose 786554 usa us_english en_us
[2/26/03 14:06:37:732 GMT] 28000b89 ExceptionUtil E CNTR0019E: Non-application exception occurred while processing method "testXMLType". Exception data: java.lang.InternalError: com.sun.msv.grammar.SequenceExp; Local class not compatible: stream classdesc serialVersionUID=1 local class serialVersionUID=-7974355479034793043
at com.sun.xml.bind.validator.SchemaDeserializer.deserialize(SchemaDeserializer.java:28)
at COMPUTER2.impl.AddressTypeImpl.<clinit>(AddressTypeImpl.java:20)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at COMPUTER2.ObjectFactory.<clinit>(ObjectFactory.java:23)
at COMPUTER2.Sample.createAddressFromString(Sample.java:55)
at COMPUTER2.Sample.createNewInstancesFromFile(Sample.java:38)
at dw.custx2Bean.ejbHomeTestXMLType(custx2