Announcement Announcement Module
Collapse
No announcement yet.
Only dates between January 1, 1753 and December 31, 9999 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Only dates between January 1, 1753 and December 31, 9999

    Hi Folks,

    I am getting the following error message while trying to update the record in mssql server database. unfortunately i donot see this error message for all the records, but only for few records. At the moment when ever i see the error i delete the record and i replicate the same record and the operation is successful. I donot understand why is this happening? It started all of a sudden.. Any help is appreciated.

    SQL Error: 0, SQLState: 22003
    2005-04-18 16:16:17,987 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Only dates between January 1, 1753 and December 31, 9999 are accepted.
    2005-04-18 16:16:17,987 ERROR net.sf.hibernate.impl.SessionImpl - Could not synchronize database state with session
    2005-04-18 16:16:17,987 WARN org.springframework.jdbc.support.SQLErrorCodeSQLEx ceptionTranslator - Unable to translate SQLException with errorCode '0', will now try the fallback translator
    2005-04-18 16:16:17,987 INFO org.springframework.jdbc.support.SQLStateSQLExcept ionTranslator - Translating SQLException with SQLState '22003' and errorCode '0' and message [Only dates between January 1, 1753 and December 31, 9999 are accepted.]; SQL was [] for task [Hibernate operation]
    2005-04-18 16:16:18,065 WARN org.springframework.web.servlet.DispatcherServlet - Handler execution resulted in exception - forwarding to resolved error view
    org.springframework.dao.DataIntegrityViolationExce ption: (Hibernate operation): data integrity violated by SQL ''; nested exception is java.sql.SQLException: Only dates between January 1, 1753 and December 31, 9999 are accepted.
    java.sql.SQLException: Only dates between January 1, 1753 and December 31, 9999 are accepted.
    at net.sourceforge.jtds.jdbc.TdsData.calendarToSybDat e(TdsData.java:2140)
    at net.sourceforge.jtds.jdbc.TdsData.putDateTimeValue (TdsData.java:2214)
    at net.sourceforge.jtds.jdbc.TdsData.writeParam(TdsDa ta.java:1887)
    at net.sourceforge.jtds.jdbc.TdsCore.executeSQL70(Tds Core.java:3654)
    at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCo re.java:984)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL (JtdsStatement.java:412)

  • #2
    Sreedhar,

    This looks like a problem in the jTDS driver and may well be a restriction based on the column time you are using. You should check the storage capacity of the column you are trying to insert into.

    Rob

    Comment


    • #3
      Thanks Rob. Is there any test case to proove this? Any method that returns false if storage capacity of the column exceeds.

      Thanks for your help

      Comment


      • #4
        I think that would depend on your database. I'm not really sure how you would approach that problem.

        Rob

        Comment


        • #5
          MSSql db sever datetime field excepts only dates between the mentioned values.

          Debug the values of dates that you are putting in.

          It is funny that replication works. Are you sure that you put the same "replicated" object in?

          I m not aware of any similar Hibernate or jTDS problems.

          Comment


          • #6
            Yes, I am sure that i am putting the same object.
            In the error stack i see the following message as well.
            Could not synchronize database state with session

            Comment


            • #7
              Debug the dates - from ALL objects which get flushed.

              Comment

              Working...
              X