Announcement Announcement Module
Collapse
No announcement yet.
Date problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Date problem

    Hi all,
    I am getting this error while inserting date.
    Code:
    [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
    2005-12-21 18:30:12,234 INFO [org.springframework.jdbc.support.SQLErrorCodesFactory] - SQLErrorCodes loaded: [DB2, HSQL, MS-SQL, MySQL, Oracle, Informix, PostgreSQL, Sybase]
    2005-12-21 18:30:16,953 ERROR [com.home.Entry24by7Controller] - Error in 24by7  *******
    org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into ON_CALL(EMP_NO,SUPPORT_DETAILS,PRDUCT_NAME,FROM_DATE,TO_DATE,DURATION) values(?,?,?,?,?,?)]; ORA-01843: not a valid month
    ; nested exception is java.sql.SQLException: ORA-01843: not a valid month
    
    java.sql.SQLException: ORA-01843: not a valid month
    I am inserting date in format as dd/MM/yyyy.

  • #2
    This isn't really a Spring MVC problem, or even a Spring problem, it's a JDBC one. You need to make sure your date is entered in a way understood by JDBC. "dd/MM/yyyy" is not, unless you tell it how to deal with it. Google on "JDBC date format" and you should come up with something useful.

    Comment

    Working...
    X