0 Replies Latest reply on Oct 12, 2001 4:18 PM by prakash_2

    Problem with Release 2.4.1 and Connection Pooling

    prakash_2

      I am new to Jboss (but not new to J2EE and App Servers).

      I have been trying to get a sample entity bean example to work but running into problems with the JDBC connection pooling (I think). I have tried both HyperSonicSQL and MSSql (7.0) but getting the same exact behavior. Following is a trace from the JBOSS terminal screen.

      Please HELP !!

      thanks.

      Prakash Teli

      ----------------- TRACE BEGIN ----------------
      [Default] Caught SQLException in ejbFindByPrimaryKey: java.sql.SQLException: Con
      nection is broken: Connection aborted by peer: JVM_recv in socket input stream r
      ead
      [Customer2] XAException: tx=XidImpl [FormatId=257, GlobalId=minervadev08//1, Bra
      nchQual=] errorCode=XA_UNKNOWN(0)
      [Customer2] javax.transaction.xa.XAException: Rollback failed: Connection is bro
      ken: Connection aborted by peer: socket write error
      [Customer2] at org.jboss.pool.jdbc.xa.wrapper.XAResourceImpl.rollback(XAReso
      urceImpl.java:219)
      [Customer2] at org.jboss.tm.TxCapsule.rollbackResources(TxCapsule.java:1539)

      [Customer2] at org.jboss.tm.TxCapsule.rollback(TxCapsule.java:394)
      [Customer2] at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:88
      )
      [Customer2] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
      InterceptorCMT.java:352)
      [Customer2] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxIntercept
      orCMT.java:86)
      [Customer2] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(Security
      Interceptor.java:103)
      [Customer2] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogIntercepto
      r.java:106)
      [Customer2] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java
      :420)
      [Customer2] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
      Home(JRMPContainerInvoker.java:370)
      [Customer2] at java.lang.reflect.Method.invoke(Native Method)
      [Customer2] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
      a:241)
      [Customer2] at sun.rmi.transport.Transport$1.run(Transport.java:142)
      [Customer2] at java.security.AccessController.doPrivileged(Native Method)
      [Customer2] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
      [Customer2] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
      t.java:443)
      [Customer2] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
      ransport.java:643)
      [Customer2] at java.lang.Thread.run(Thread.java:484)
      [Customer2] TRANSACTION ROLLBACK EXCEPTION:null
      Embedded Exception
      Connection is broken: Connection aborted by peer: JVM_recv in socket input strea
      m read; nested exception is:
      javax.ejb.EJBException: null
      Embedded Exception
      Connection is broken: Connection aborted by peer: JVM_recv in socket input strea
      m read
      [Customer2] java.sql.SQLException: Connection is broken: Connection aborted by p
      eer: JVM_recv in socket input stream read
      [Customer2] at org.hsql.Trace.getError(Trace.java:124)
      [Customer2] at org.hsql.Trace.getError(Trace.java:115)
      [Customer2] at org.hsql.Trace.error(Trace.java:130)
      [Customer2] at org.hsql.jdbcConnection.executeHSQL(jdbcConnection.java:642)
      [Customer2] at org.hsql.jdbcConnection.execute(jdbcConnection.java:540)
      [Customer2] at org.hsql.jdbcStatement.fetchResult(jdbcStatement.java:499)
      [Customer2] at org.hsql.jdbcStatement.executeQuery(jdbcStatement.java:37)
      [Customer2] at org.jboss.pool.jdbc.StatementInPool.executeQuery(StatementInP
      ool.java:141)
      [Customer2] at jbossbmp.ejb.CustomerBeanVersion2.ejbFindByPrimaryKey(Custome
      rBeanVersion2.java:205)
      [Customer2] at java.lang.reflect.Method.invoke(Native Method)
      [Customer2] at org.jboss.ejb.plugins.BMPPersistenceManager.callFinderMethod(
      BMPPersistenceManager.java:474)
      [Customer2] at org.jboss.ejb.plugins.BMPPersistenceManager.findEntity(BMPPer
      sistenceManager.java:227)
      [Customer2] at org.jboss.ejb.EntityContainer.find(EntityContainer.java:594)
      [Customer2] at java.lang.reflect.Method.invoke(Native Method)
      [Customer2] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome
      (EntityContainer.java:843)
      [Customer2] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke
      Home(EntitySynchronizationInterceptor.java:231)
      [Customer2] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En
      tityInstanceInterceptor.java:154)
      [Customer2] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(Entity
      LockInterceptor.java:108)
      [Customer2] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercept
      orCMT.java:135)
      [Customer2] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
      InterceptorCMT.java:307)
      [Customer2] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxIntercept
      orCMT.java:86)
      [Customer2] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(Security
      Interceptor.java:103)
      [Customer2] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogIntercepto
      r.java:106)
      [Customer2] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java
      :420)
      [Customer2] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
      Home(JRMPContainerInvoker.java:370)
      [Customer2] at java.lang.reflect.Method.invoke(Native Method)
      [Customer2] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
      a:241)
      [Customer2] at sun.rmi.transport.Transport$1.run(Transport.java:142)
      [Customer2] at java.security.AccessController.doPrivileged(Native Method)
      [Customer2] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
      [Customer2] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
      t.java:443)
      [Customer2] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
      ransport.java:643)
      [Customer2] at java.lang.Thread.run(Thread.java:484)

      ----------------------- TRACE END ---------------

      Here are the entries in jboss.jcml file. The connection pools gets created successfully and there are no errors on the JBOSS server startup. It looks like it is failing in PreparedStatement.executeQuery()
      call.

      ---------------

      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      SQLServerPool
      jdbc:odbc:esolveSQL
      esolve
      esolve
      false
      false
      false
      true
      120000
      1800000
      false
      false
      1.0
      0