castor

MarshalException is not serializable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0.5, 1.1
  • Fix Version/s: 1.1.1
  • Component/s: XML
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    2

Description

When unmarshaling an xml document using classes generated with the xml code generator, the Unmarshaler can throw a MarshalException is not serializable. If a required xml element is missing from the xml file castor throws a MarshalException which contains a ValidationException as the cause. The validation exception has a XPathLocation in the _location field and the XPathLocation is not serializable. I get the following error:

java.io.NotSerializableException: org.exolab.castor.xml.XPathLocation
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)

This is probably related to CASTOR-91 but it looks like in case I'm having trouble serializing a different class. I've checked in a test case which exhibits the problem with castor 1.1.

Activity

Hide
Werner Guttmann added a comment -

Final patch for review.

Show
Werner Guttmann added a comment - Final patch for review.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: