[ASK] How to fix this java error with timestamp

Results 1 to 2 of 2
  1. #1
    Proficient Member faqiir is offline
    MemberRank
    Dec 2008 Join Date
    195Posts

    [ASK] How to fix this java error with timestamp

    Hello, i build server long time a go but never know this error,
    java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 8 to TIMESTAMP.
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
    at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1328)
    at com.mysql.jdbc.ByteArrayRow.getTimestampFast(ByteArrayRow.java:124)
    at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java: 6669)
    at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:5988)
    at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:4944)
    at application.query.handler.executeQuery(Unknown Source)
    at application.query.select.handler.execute(Unknown Source)
    at application.query.select.handler.execute(Unknown Source)
    at com.goldhuman.account.storage.getUseCashNow(Unknown Source)
    at protocol.GAuthServer$1.run(Unknown Source)
    at java.util.TimerThread.mainLoop(Timer.java:534)
    at java.util.TimerThread.run(Timer.java:484)
    Caused by: java.sql.SQLException: Value '[B@67e13e07' can not be represented as java.sql.Timestamp
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
    at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1027)
    any ppl here can give help to fix this error, please, thank you


  2. #2
    Enthusiast rikipaco is offline
    MemberRank
    Feb 2010 Join Date
    34Posts

    Re: [ASK] How to fix this java error with timestamp

    It say that "0000-00-00 00:00:00" isnt a type of date time. and is true jejeje. the date "0000-00-00 00:00:00" dont exist, write a real date.



Advertisement