Announcement Announcement Module
Collapse
No announcement yet.
Help with Spring jdbctemplate error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with Spring jdbctemplate error

    Hi,

    I am using JDBCTemplate to call a stored procedure in DB2 as below

    String sql = "call SP_MODIFYDATA(?,?,?,?)";
    jdbctemplate.update(sql, new Object[]{ids, dateVal, comments, role});


    Three parameters except dateVal are String and the above code is working fine of the String parameter value is small. But when the value of ids is big its throwing below error.

    com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet testservlet in application SpringApp. Exception created : org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationExce ption: PreparedStatementCallback; SQL [call SP_MODIFYDATA(?,?,?,?)]; Value "2009-07-01 10:29:36.826#2009-06-24 11:26:26.268#2009-07-01 1" is too long.. SQLCODE=-433, SQLSTATE=22001, DRIVER=3.50.152; nested exception is com.ibm.db2.jcc.b.jm: Value "2009-07-01 10:29:36.826#2009-06-24 11:26:26.268#2009-07-01 1" is too long.. SQLCODE=-433, SQLSTATE=22001, DRIVER=3.50.152

    I am not sure if there is any limit on the size of parameters to the update method. Please help.

    Thanks.
    Last edited by Nick_Andy; Jul 29th, 2009, 04:56 PM. Reason: Problem Solved. Issue was with Stored procedure.

  • #2
    Problem resolved - Error was bcoz of Stored procedure.

    Problem resolved - Error was bcoz of Stored procedure.

    Comment

    Working...
    X