Hi All.

I have a problem unmarshalling an object from XML.

The following exception is thrown when I call
Unmarshaller.unmarshal(My.class, SomeReader).

    org.xml.sax.SAXException: unable to instantiate a new type of:
java.util.Map

>From reading the mailing list archive, I learned that older versions of
Castor had problems unmarshalling HashMaps. So I updated  to castor-0.9.4.1.
Still the same problem.

The unmarshalling works fine with another object of the same class.

The xml generated by castor for these two objects only differs in that one
of them has:

<validator-results><result-value-map xsi:type="date"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>1999-01-12T00:09:00.00
0+01:00</result-value-map><result-value-map xsi:type="date"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>2002-01-04T00:10:00.00
0+01:00</result-value-map>< xsi:type="java:java.util.HashMap$HashIterator"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></validator-results>

The other one has not. The object that this xml belongs to, does not
unmarhal correctly, the otherone does.

Both Objects extend org.apache.struts.validator.ValidatorForm.

Help would be greatly appreciated.

Kind regards.
Thomas Delnoij
Internet Engineer
IMN - SSE Baarn

Mobile: +31 6 144 300 14
EMail: [EMAIL PROTECTED]

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to