Results 1 to 2 of 2

Thread: Help with Spring jdbctemplate error

  1. #1
    Join Date
    May 2009
    Posts
    10

    Default 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 at 03:56 PM. Reason: Problem Solved. Issue was with Stored procedure.

  2. #2
    Join Date
    May 2009
    Posts
    10

    Default Problem resolved - Error was bcoz of Stored procedure.

    Problem resolved - Error was bcoz of Stored procedure.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •