Menu

#3 field type convertors

open
nobody
None
5
2001-03-29
2001-03-29
lee fellows
No

Hi,

I am getting an exception:
net.sourceforge.osage.mapping.MappingException: No
convertor exists for converting java.lang.String to
java.sql.Timestamp.

What do I need to do?

Lee Fellows

Discussion

  • george w. stewart

    Logged In: YES
    user_id=28717

    Hi Lee,

    It would be better if you gave the mapping with this. Do
    you have java.sql.Timestamp in db and String in class
    field? There's no built in convertor for this. You can
    write your own custom convertors. Instead of this, I
    recommend that you use java.util.Date (field type date).
    You'll need patch for this. Please see mailing list about
    this.

    Please see Types.java in package
    net.sourceforge.osage.castor for a list of built-in
    convertors.

    Regards, george

     
  • lee fellows

    lee fellows - 2001-03-30

    Logged In: YES
    user_id=163683

    Hi George,

    Thank you. Interestingly, I had defined timestamp for the
    db and
    Timestamp for java and still got the error. I remember
    reading of a Date
    conversion problem on the Castor mailing list.

    I will pursue this.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.