0 Replies Latest reply on Jan 29, 2002 10:16 AM by Bernard Lavallee

    DB2 and Minerva Pool

    Bernard Lavallee Newbie

      I am having a problem with DB2 Version 7. I've run this same application against Informix and Oracle and it works just fine. Here is the problem:

      This is an EJB application. The session bean runs a method that processes 200 inserts into a table in DB2. The method retrieves a pool connection and attempts to make the 200 inserts. The results are unpredictable in that I may get 50 inserts done or 150 done before I get the error shown at the bottom of this message. The error seems to be happening everytime the program hits a conPool.commit() statement and I'm using a connection from Minerva.

      If I switch to a straight connection, bypassing the pool, everything works as expected. That is, no errors in the commit statement.

      Any ideas????

      [Default] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001
      [Default] at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException
      (SQLExceptionGenerator.java:254)
      [Default]
      [Default] at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException
      (SQLExceptionGenerator.java:197)
      [Default]
      [Default] at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(
      SQLExceptionGenerator.java:436)
      [Default]
      [Default] at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2Prepare
      dStatement.java:1186)
      [Default]
      [Default] at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(DB2Pr
      eparedStatement.java:778)
      [Default]
      [Default] at rpi.dao.commonDAO.WriteErrorLog(commonDAO.java:410)
      [Default]
      [Default] at rpi.dao.commonDAO.WriteErrorLogInteractive(commonDAO.java:351
      )
      [Default]
      [Default] at rpi.dao.commonDAO.WriteErrorLog(commonDAO.java:221)
      [Default]
      [Default] at rpi.db.crec.server.CRECBean.writeError(CRECBean.java:2333)
      [Default]
      [Default] at rpi.db.crec.server.CRECBean.AddMultiple(CRECBean.java:1148)
      [Default]
      [Default] at rpi.db.crec.server.CRECBean.ValidateAdds(CRECBean.java:762)
      [Default]
      [Default] at java.lang.reflect.Method.invoke(Native Method)
      [Default]
      [Default] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.i
      nvoke(StatefulSessionContainer.java:650)
      [Default]
      [Default] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
      rceptor.java:128)
      [Default]
      [Default] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invo
      ke(StatefulSessionInstanceInterceptor.java:243)
      [Default]
      [Default] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercept
      orCMT.java:133)
      [Default]
      [Default] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
      InterceptorCMT.java:307)
      [Default]
      [Default] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCM
      T.java:99)
      [Default]
      [Default] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.ja
      va:195)
      [Default]
      [Default] at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSession
      Container.java:341)
      [Default]
      [Default] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
      (JRMPContainerInvoker.java:395)
      [Default]
      [Default] at java.lang.reflect.Method.invoke(Native Method)
      [Default]
      [Default] at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
      [Default]
      [Default] at sun.rmi.transport.Transport$1.run(Unknown Source)
      [Default]
      [Default] at java.security.AccessController.doPrivileged(Native Method)
      [Default]
      [Default] at sun.rmi.transport.Transport.serviceCall(Unknown Source)
      [Default]
      [Default] at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Sou
      rce)
      [Default]
      [Default] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unkn
      own Source)
      [Default]
      [Default] at java.lang.Thread.run(Unknown Source)