3 Replies Latest reply on Feb 15, 2005 10:17 AM by razor_harm

    Anyone seen this?

    thad

      I have a MDB that receives a message and then creates two messages that it delivers onto two different queues. This system will eventually (if I ever get it there) receive hundreds of thousands of messages an hour, so it's important I figure this out. When I put a few hundred messages onto the MDBs queue I start getting the following exception sporadicly:

      org.jboss.mq.SpyJMSException: Could not crate tx: 640; - nested throwable: (java.sql.SQLException: Violation of unique index: SYS_PK_JMS_TRANSACTIONS in statement [INSERT INTO JMS_TRANSACTIONS (TXID) values(640)])
      at org.jboss.mq.pm.jdbc2.PersistenceManager.createPersistentTx(PersistenceManager.java:666)
      at org.jboss.mq.pm.TxManager.createTx(TxManager.java:77)
      at org.jboss.mq.server.JMSDestinationManager.transact(JMSDestinationManager.java:419)
      at org.jboss.mq.server.JMSServerInterceptorSupport.transact(JMSServerInterceptorSupport.java:186)
      at org.jboss.mq.security.ServerSecurityInterceptor.transact(ServerSecurityInterceptor.java:182)
      at org.jboss.mq.server.TracingInterceptor.transact(TracingInterceptor.java:438)
      at org.jboss.mq.server.JMSServerInvoker.transact(JMSServerInvoker.java:186)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:166)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:356)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.sql.SQLException: Violation of unique index: SYS_PK_JMS_TRANSACTIONS in statement [INSERT INTO JMS_TRANSACTIONS (TXID) values(640)]
      at org.hsqldb.Trace.getError(Unknown Source)
      at org.hsqldb.jdbcResultSet.(Unknown Source)
      at org.hsqldb.jdbcConnection.executeStandalone(Unknown Source)
      at org.hsqldb.jdbcConnection.execute(Unknown Source)
      at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
      at org.hsqldb.jdbcStatement.executeUpdate(Unknown Source)
      at org.hsqldb.jdbcPreparedStatement.executeUpdate(Unknown Source)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:335)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.createPersistentTx(PersistenceManager.java:660)
      ... 11 more

      Any help is greatly appreciated.

        • 1. Re: Anyone seen this?
          thad

          The problem was that my hsqldb localDB had become corrupt (I use it for message persistance). I fixed it by deleting the localDB* files in the server//data/hypersonic directory. JBoss recreated the database after restarting and it's now fixed.

          • 2. Re: Anyone seen this?
            gianrock

            HI,
            I have a problem similar to your. So I delete hsql files and restart JBoss (i use 3.2.5) . Everything work just fine. But if I shut down jboss and restart it another time without deleting hypersonic DB,it crashes again for the same reason.

            • 3. Re: Anyone seen this?
              razor_harm

              You probably should not use HSQL. I would recommend a more 'production ready' RDMS as MySQL, PostgreSQL or Oracle.