Hi Marko,
somewhere between releases 1.0 and 1.2 we had to change the java type
used for xsd:integer according to the requirements of xml schema
specification. As far as I recall we tried to implement a backward
compatibility patch after the first complaints, but I can not tell you
if that covers all releases or made it into the codebase at all. You may
want to consult the release notes for more details on that. Let's see if
Werner, who worked on that, can jump in and explain things in details.
The suggestion I can give you is, to use 1.0.5 release to unmarshal to
classes generated with 1.0.5.
Regards
Ralf
Marko Srdanovic schrieb:
> Hi,
>
> I have a project that is using a library which includes code generated
> using castor 1.0.5. I have some xml that validates properly (in xmlspy)
> against the same version of the schema. When I try to unmarshal the xml
> using the castor 1.2 libraries, I see the an error saying "Expecting an
> Long, received instead: java.lang.Integer" (see below). From what I can
> tell, the code generated using 1.0.5 has a typeValidator = new
> org.exolab.castor.xml.validators.IntegerValidator(), however the
> IntegerValidator in 1.2 is really for java long types and the
> IntValidator should be used.
>
> At this point, I can't change the old libraries. Is there any simple
> way of getting around this?
>
> Thanks!
> -- Marko
>
> org.exolab.castor.xml.MarshalException: The following exception occured
> while validating field: _diagramLayout of class:
> edu.mssm.crover.domain2d.rbdg.xml.RbdeDiagram: The following exception
> occured while validating field: _subunitList of class:
> edu.mssm.crover.domain2d.rbdg.xml.DiagramLayout: The following exception
> occured while validating field: _spacer of class:
> edu.mssm.crover.domain2d.rbdg.xml.Subunit: The following exception
> occured while validating field: _x of class:
> edu.mssm.crover.domain2d.rbdg.xml.Spacer: Expecting an Long, received
> instead: java.lang.Integer{File: [not available]; line: 65; column: 16}
> at
> org.exolab.castor.xml.Unmarshaller.convertSAXExceptionToMarshalException(Unmarshaller.java:761)
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email