Announcement Announcement Module
Collapse
No announcement yet.
Value '0000-00-00' can not be represented as java.sql.Timestamp Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Value '0000-00-00' can not be represented as java.sql.Timestamp

    I'm upgrading my db server from mysql 4.0.23 to 5.0 and i have also updated mysql connector from 3.1 to 5.0.3. I'm using Spring 2.x with hibernate3 and jdk1.5
    The problem i'm facing is that when a column in db contains some zero value like "0000-00-00" or "00000000" with data type date, datetime or timestamp
    it returns error
    Value '0000-00-00' can not be represented as java.sql.Timestamp

    Please help me if anyone have any idea about this problem
    Thanks in advance

  • #2
    0000-00-00 is not a valid date and the error is that mysql is allowing it to be saved like that in the db in the first place. I'd suggest using null value instead.

    Comment

    Working...
    X