1 Reply Latest reply on Jul 9, 2004 11:30 PM by Adrian Brock

    Exception destroying ManagedConnection

    n2mp Newbie

      I'm getting an exception when JMS persists a message to a database. Our setup is JBoss 3.2.3 running on Linux (64 bit), w/JMS persisting to Oracle 9i.

      The exception is thrown when the database connection is closed. To make matters worse, the message gets inserted into the database even when the database close exception occurs. At this point, JMS re-attempts to persist the message to the database. Now the exception is a primary key violation since the messge inserted is already in the database.

      What's puzzling is that I haven't seen the close exception realated to the CMPs. I'm assuming they are using the same connection pool as JMS.

      I've configured JBoss 3.2.5 on the same Linux server and Oracle 9i with the hope that the problem wouldn't appear, but that is not the case. I see the same exception with 3.2.5 as with 3.2.3.

      Any thoughts or suggestions as to how to resolve this problem would be GREATLY appreciated.

      The listing below is for the JBoss 3.2.3 stack trace


      21:29:26,616 WARN [JBOSSManagedconnectionpool] Exception destroying Managedconnection
      org.jboss.resource.JBOSSResourceException: SQLException; - nested throwable: (java.sql.SQLException: I0 exception: Broken pipe)
      at org.jboss.resource.adapter.jdbc.BasewrapperManagedconnection.checkException(BasewrapperManagedconnection.java:546)
      at org.jboss.resource.adapter.jdbc.BasewrapperManagedconnection.destroy(BasewrapperManagedconnection.java:252)
      at org.jboss.resource.connectionmanager.InternalManagedconnectionpool .doDestroy(InternalManagedconnectionpool.java:502)
      at org.]boss.resource.connectionmanager.InternalManagedconnectionpool .returnconnection(InternalManagedconnectionpool .java:326) at
      org.jboss.resource.connectionmanager.JBOSSManagedconnectionpool$Basepool.returnconnection(JBossManagedconnectionpool.java:508)
      at org.jboss.resource.connectionmanager.BaseconnectionManager2.returnManagedconnection(BaseConnectionManager2.java:436)
      at org.jboss.resource.connectionmanager.BaseconnectionManager2$BaseconnectionEventListener.connectionErroroccurred(BaseConnectionManager2.java: 778)
      at org.jboss.resource.connectionmanager.TxconnectionManager$TxConnectionEventListener.connectionErroroccurred(TxconnectionManager.java:615 )
      at org.jboss.resource.adapter.jdbc.BasewrapperManagedconnection.broadcastConnectionError(BasewrapperManagedconnection.java:325) at org.jboss.resource.adapter.jdbc.BasewrapperManagedconnection.connectionError(BasewrapperManagedconnection.java: 310)
      at org.jboss.resource.adapter.jdbc.wrappedconnection.checkException(wrappedconnection.java:793)
      at org.jboss.resource.adapter.jdbc.wrappedStatement.checkException(wrappedStatement.java:802)
      at org.jboss.resource.adapter.]dbc.wrappedStatement.close(wrappedstatement.java:61)
      at org.jboss.mq.pm.jdbc2.persistenceManager.add(persistenceManager.java:790)
      at org.jboss.mq.pm.jdbc2.persistenceManager.saveToStorage(persistenceManager.java:1210)
      at org.jboss.mq.server.Messagecache.saveToStorage(Messagecache.java:393)
      at org.jboss.mq.server.MessageReference.makeSoft(MessageReference.java:250)
      at org.jboss.mq.server.Messagecache.validatesoftReferenceDepth(Messagecache.java:328)
      at org.jboss.mq.server.Messagecache.addInternal(Messagecache.java:127)
      at org.jboss.mq.server.Messagecache.add(Messagecache.]ava:97)
      at org.jboss.mq.server.JMSTopic.addMessage(JMSTopic.java:364)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:407)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.]ava:383)
      at org.jboss.mq.server.JMSServerInterceptorsupport.addMessage(JMSServerInterceptorSupport.java:136)
      at org.jboss.mq.security.serversecuritYInterceptor.addMessage(serversecurityInterceptor.java:162)
      at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:279)
      at org.jboss.mq.server.JMSSerVerInvoker.addMessage(JMSServerInvoker.java:136)
      at org.jboss.mq.il .jvm.JVMServerIL.addMessage(JVMServerIL.java:137)
      at org.jboss.mq.connection.sendToserver(connection.java:1243)
      at org.jboss.mq.spysession.sendMessage(spysession.java:732)
      at org.jboss.mq.spyTOpicPublisher.internalpublish(spyTopicPublisher.java:120)
      at org.jboss.mq.spyTopicPublisher.publish(SpyTopicPublisher.java:68)


        • 1. 3860386
          Adrian Brock Master

          The database connection is broken:

          org.jboss.resource.adapter.jdbc.BasewrapperManagedconnection.connectionError(BasewrapperManagedconnection.java: 310)
          at org.jboss.resource.adapter.jdbc.wrappedconnection.checkException(wrappedconnection.java:793)
          at org.jboss.resource.adapter.jdbc.wrappedStatement.checkException(wrappedStatement.java:802)
          at org.jboss.resource.adapter.]dbc.wrappedStatement.close(wrappedstatement.java:61)
          at org.jboss.mq.pm.jdbc2.persistenceManager.add(persistenceManager.java:790)

          See the JCA forum "READ THIS FIRST" for how to debug to the problem.