Hi Damien, Thanks for the bugzilla, we will make sure to fix the issue when time allows it.
Arnaud > -----Original Message----- > From: Damien GAUTIER-DE-LAHAUT [mailto:[EMAIL PROTECTED] > Sent: Monday, February 24, 2003 3:58 PM > To: [EMAIL PROTECTED] > Subject: Re: [castor-dev] Parsing exception of a xsd:Time > > The bug has been registered under number 1228 on > http://bugzilla.exolab.org castor. > > Thank you Keith Visco > and thank you John Weir for your answer > > Damien > > Le ven 21/02/2003 � 22:52, Keith Visco a �crit : > > > > Hi Damien, > > > > Can you file this as a bug (http://bugzilla.exolab.org). Castor is > > probably not handling the extension correctly when simpleContent is > > involved. It's probably an issue with the default > > XMLClassDescriptorImpl. > > > > --Keith > > > > > > > > Damien GAUTIER-DE-LAHAUT wrote: > > > > > > Hello, > > > > > > When unmarshalling an xml file I get the following exception : > > > ------------------------------------------------------------- > > > org.xml.sax.SAXException: unable to add text content to CTOT due to the > > > following error: java.lang.IllegalStateException: > > > java.lang.ClassCastException{file: ; line: 43; column: 98} > > > > > > The line in question is : > > > ------------------------ > > > > > > <CTOT Source="Damien" > > > ModificationTime="14:20:00.456">11:08:06.123</CTOT> > > > > > > with column 98 is just after the last character of this line > > > > > > The type of this Element is complex : > > > ----------------------------------- > > > > > > the content of the element is an xsd:time > > > and the element has 2 attributes, one is string and the other is of type > > > xsd:time. > > > > > > <xsd:element name="CTOT" type="CDMTimeType" minOccurs="0"/> > > > > > > <xsd:complexType name="CDMTimeType"> > > > <xsd:simpleContent> > > > <xsd:extension base="xsd:time"> > > > <xsd:attribute name="Source" type="xsd:string" > use="optional"/> > > > <xsd:attribute name="ModificationTime" > type="xsd:time" > > > use="optional"/> > > > </xsd:extension> > > > </xsd:simpleContent> > > > </xsd:complexType> > > > > > > Some comment : > > > ------------ > > > > > > When I suppress the content, and consequently it remains > > > > > > <CTOT Source="Damien" ModificationTime="14:20:00.456"></CTOT> > > > > > > it unmarshalls correctly (and when I marshall and print the result, I > > > get exactly my original file, excellent) > > > > > > Then I set the value Programmally : > > > > > > org.exolab.castor.types.Time tm = new > > > org.exolab.castor.types.Time("11:08:06.123"); > > > ....getCTOT().setContent(tm); > > > > > > It works and then, on the output I then get : > > > > > > <CTOT Source="Damien" > > > ModificationTime="14:20:00.456">11:08:06.123</CTOT> > > > > > > And this is precisely what I tried to parse at the begining but it > > > produced exception. > > > > > > Can someone help me to understand this problem. > > > > > > I thank you a lot > > > > > > Damien Gautier de Lahaut > > > > > > ----------------------------------------------------------- > > > If you wish to unsubscribe from this mailing, send mail to > > > [EMAIL PROTECTED] with a subject of: > > > unsubscribe castor-dev > > > > ----------------------------------------------------------- > > If you wish to unsubscribe from this mailing, send mail to > > [EMAIL PROTECTED] with a subject of: > > unsubscribe castor-dev > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
