Hi All,
When trying to unmarshall an XML document I'm getting the following
exception:
org.xml.sax.SAXException: unable to find FieldDescriptor for 'BR' in
ClassDescriptor of paragraph
at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:81
5)
at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java:1197)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne
r.java:1862)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1238)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:338)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:270)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:391)
at de.mediaphil.xml.test.Main.run(Main.java:30)
at de.mediaphil.xml.test.Main.main(Main.java:19)
Bellow you can find a portion of the XML Schema Used to generate
element/descriptor classes using castor SourceGen:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="BR">
<xs:complexType mixed="true">
<xs:attribute name="type" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="paragraph">
<xs:complexType mixed="true">
<xs:attribute name="class" type="xs:string"/>
<xs:attribute name="style" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="qxpobject">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="textbox" minOccurs="0"/>
(...)
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="textbox">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="qxpobject" minOccurs="0"/>
<xs:element ref="paragraph" minOccurs="0"/>
(...)
<xs:element ref="BR" minOccurs="0"/>
(...)
</xs:sequence>
<xs:attribute name="pgnbr" type="xs:string"/>
(... some other attributes ...)
</xs:complexType>
</xs:element>
</xs:schema>
I'm using castor XML version 0.9.3 ... I already found a similar problem in
your mailling list archive ... I found out that this is a known bug and you
are working on it ...
My question is: what is the status right now ... If it is not solved in this
version, how can I overcome this problem (temporary at least). Please give
me some tips, tricks or suggestions.
Thanks a lot in advance.
Regards,
Emil Stetco
Medipahil GmbH,
Munich, Germany
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev