com.thoughtworks.xstream.converters.ConversionException: Cannot parse date 2009-05-19T07:40:00 ---- Debugging information ---- class : com.vangenechten.system.edi.model.DelForHeader required-type : java.util.Date path : /com.vangenechten.system.edi.model.DelForHeader/createDate line number : 6 -------------------------------

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Using the transformer XMLToObject, if you have inside the XML this: ... .... <createDate>2009-05-19T07:40:00</createDate> .... .... When I try to convert to the object using xml-to-object-transformer I got this exception: Exception stack trace: com.thoughtworks.xstream.converters.ConversionException: Cannot parse date 2009-05-19T07:40:00 ---- Debugging information ---- class : com.vangenechten.system.edi.model.DelForHeader required-type : java.util.Date path : /com.vangenechten.system.edi.model.DelForHeader/createDate line number : 6 ------------------------------- at com.thoughtworks.xstream.converters.basic.DateConverter.fromString(DateConverter.java:52) at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.fromString(SingleValueConverterWrapper.java:31) at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:39) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46) at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66) A solution for that would be extend a little bit the transformer with some details like gregorian date, locale and others. To solve this problem, I will create a customize Transformer, like: import org.mule.api.transformer.TransformerException; import org.mule.module.xml.transformer.XmlToObject; import com.thoughtworks.xstream.converters.extended.ISO8601GregorianCalendarConverter; public class SoapMessageConverter extends XmlToObject { public SoapMessageConverter() { super(); try { getXStream().registerConverter(new ISO8601GregorianCalendarConverter()); } catch (TransformerException e) { throw new RuntimeException("unable to get xstream " + "in converter constructor "+e.getMessage()); } } }
    via by Patrick Santana,
  • Using the transformer XMLToObject, if you have inside the XML this: ... .... <createDate>2009-05-19T07:40:00</createDate> .... .... When I try to convert to the object using xml-to-object-transformer I got this exception: Exception stack trace: com.thoughtworks.xstream.converters.ConversionException: Cannot parse date 2009-05-19T07:40:00 ---- Debugging information ---- class : com.vangenechten.system.edi.model.DelForHeader required-type : java.util.Date path : /com.vangenechten.system.edi.model.DelForHeader/createDate line number : 6 ------------------------------- at com.thoughtworks.xstream.converters.basic.DateConverter.fromString(DateConverter.java:52) at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.fromString(SingleValueConverterWrapper.java:31) at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:39) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46) at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66) A solution for that would be extend a little bit the transformer with some details like gregorian date, locale and others. To solve this problem, I will create a customize Transformer, like: import org.mule.api.transformer.TransformerException; import org.mule.module.xml.transformer.XmlToObject; import com.thoughtworks.xstream.converters.extended.ISO8601GregorianCalendarConverter; public class SoapMessageConverter extends XmlToObject { public SoapMessageConverter() { super(); try { getXStream().registerConverter(new ISO8601GregorianCalendarConverter()); } catch (TransformerException e) { throw new RuntimeException("unable to get xstream " + "in converter constructor "+e.getMessage()); } } }
    via by Patrick Santana,
    • com.thoughtworks.xstream.converters.ConversionException: Cannot parse date 2009-05-19T07:40:00 ---- Debugging information ---- class : com.vangenechten.system.edi.model.DelForHeader required-type : java.util.Date path : /com.vangenechten.system.edi.model.DelForHeader/createDate line number : 6 ------------------------------- at com.thoughtworks.xstream.converters.basic.DateConverter.fromString(DateConverter.java:52) at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.fromString(SingleValueConverterWrapper.java:31) at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:39) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46) at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)
    No Bugmate found.