I have some field, where the xsd has it as an xs:dateTime
For some reason, when it was marshalled, it was stored as below.
<dateIssuedField class="org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl" resolves-to="org.apache.xerces.jaxp.datatype.SerializedXMLGregorianCalendar">
<lexicalValue>2021-08-06T00:00:00</lexicalValue>
</dateIssuedField>
I'm getting this error below.
XStream unmarshalling failed.
com.thoughtworks.xstream.converters.ConversionException: Cannot construct type
---- Debugging information ----
message : Cannot construct type
cause-exception : java.lang.InstantiationException
cause-message : javax.xml.datatype.XMLGregorianCalendar
construction-type : javax.xml.datatype.XMLGregorianCalendar
class : javax.xml.datatype.XMLGregorianCalendar
required-type : javax.xml.datatype.XMLGregorianCalendar
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
Any idea how to write a converter to handle this?
Ok worked it out.