Any known issues trying to unmarshall dates from an XML file? This same
Timestamp works perfectly fine when getting the data from a database? The
mappings are essentially the same.
Our object uses java.sql.Timestamp for our date fields.
Class myclass {
...
....
Timestamp dateEntered;
Timestamp getDateEntered() { }
void setDateEntered(Timestamp value) {....}
}
My Mapping file
<field name="dateEntered" type="java.sql.Timestamp">
<bind-xml name="date-entered" node="element"/>
</field>
The data file (Exact format of timestamp was required by Castor in earlier
exceptions I fixed)
<date-entered>2001-01-31T12:34:45.203</date-entered>
Exception I get (Why/where does it get converted to java.util.Date?)
myMethod >> MarshalException -- org.xml.sax.SAXException: unable to add
'date-entered' to <myclass> due to the following exception:
>>>--- Begin Exception ---<<<
java.lang.IllegalArgumentException: Type conversion error: could not set
value of dateEntered(java.sql.Timestamp) with value of type java.util.Date
at
org.exolab.castor.mapping.loader.FieldHandlerImpl.setValue(FieldHandlerImpl.
java:460)
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev