Hi,

if that's the case, then you've come across a regression issue. As
already stated in another reply to the original email, please open a new
Jira issue and attach all relevant artefacts so that we can replay the
issue.

Regards
Werner

P.S. Having said that, let me just add that a product can only be as
good as it's usage by the community. 1.2 has been available for more
than a year now, and i think it would have been great if we could have
included a fix for this regression issue (should it be one) with 1.3.
Well, well ...



> Hi,
> 
> I'm recieving the same exception.  This worked fine with a previous version
> of Castor 0.9.9.1.  Trying to use 1.2.
> 
> Thanks,
> Tim
> 
> 
> 
> Stephan-37 wrote:
>> Hi!
>>
>> When unmarshalling this instance
>>
>> <foo>
>>   <bar>bla</bar>
>>   <bar>blabla</bar>
>> </foo>
>>
>> with castor 1.3 generated classes of this schema
>>
>> <?xml version='1.0'?>
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
>>   <xs:group name="foobar">
>>     <xs:choice>
>>       <xs:element name="bar" type="xs:string"/>
>>     </xs:choice>
>>   </xs:group>
>>   <xs:element name="foo">
>>       <xs:complexType>
>>         <xs:sequence>
>>           <xs:group ref="foobar" minOccurs="0" maxOccurs="unbounded"/>
>>         </xs:sequence>
>>       </xs:complexType>
>>   </xs:element>
>> </xs:schema>
>>
>>  I do get this exception:
>>
>> org.exolab.castor.xml.MarshalException: Element with name bar passed to
>> type
>> foo in incorrect order; It is not allowed to be the last element of this
>> sequence!{File: [not available]; line: 3; column: 8}
>>     at
>> org.exolab.castor.xml.Unmarshaller.convertSAXExceptionToMarshalException(Unmarshaller.java:794)
>>     at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:760)
>>     at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:626)
>>     at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:840)
>>     at test.Test2.main(Test2.java:17)
>> Caused by: ValidationException: Element with name bar passed to type foo
>> in
>> incorrect order; It is not allowed to be the last element of this
>> sequence!
>>     at
>> org.exolab.castor.xml.util.XMLClassDescriptorImpl.checkDescriptorForCorrectOrderWithinSequence(XMLClassDescriptorImpl.java:340)
>>     at
>> org.exolab.castor.xml.MarshalFramework$InternalXMLClassDescriptor.checkDescriptorForCorrectOrderWithinSequence(MarshalFramework.java:794)
>>     at
>> org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1958)
>>     at
>> org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1435)
>>     at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>>     at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
>> Source)
>>     at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
>> Source)
>>     at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
>> Source)
>>     at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>>     at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>>     at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
>> Source)
>>     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
>> Source)
>>     at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>>     at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>> Source)
>>     at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:748)
>>     ... 3 more
>>
>> Is there any workaround for this?
>>
>> Thanks.
>>
>> Stephan
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to