5 Replies Latest reply on Aug 1, 2006 4:01 AM by Mark Little

    Transaction not active!!

    Sajid Moinuddin Newbie

      Hello all,
      I am running a bulk operation in a single transaction.[adding 10000 cmp entity beans].
      When I start up the server, the operation runs just fine...Even I can do the same operation for 3-4 times...But after some time, I start getting the following kind of exception saying transaction not active. I'm sure its' not a problem of transaction time out of transaction manager. In that case, the operation would never have succeeded when the server started. My guess is, my early operations are messing up the database connections or using up some sort of resouce So my later operations fails. I am very near to my deadline and suddenly this problem started. Any one please help. I am stuck in the middle of nowhere.
      regards,
      Sajid


      SQL: SELECT max( t0_x.componentId) FROM ClientTemplateElement t0_x
      2006-07-30 13:54:32,933 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.ClientTemplateElement#ejbSelectMaxPk] Find failed
      org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 7f000001:80a2:44cc58c3:707e status: 4 >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac,
      BasicAction: 7f000001:80a2:44cc58c3:707e status: 4 >)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:79)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:210)
       at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:128)
       at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:99)
       at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.invoke(JDBCSelectorBridge.java:70)
       at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:91)
       at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:62)
      


        • 1. Re: Transaction not active!!
          Mark Little Master

          Try setting the timeout to a very large value just to be sure that's not the case.

          • 2. Re: Transaction not active!!
            Sajid Moinuddin Newbie

            Hi mark,
            thnx for your suggestion. But I've already tried that. when my timeout is set to 10 mins, i get the error in 20 secs.Now, I'm being able to replicate the case. My bulk operation is completed successfully every time when the server is just started. It starts problem when there is another operation which keeps some dirty open transaction on a stateful session bean. But that operation is on a different component & different table. It seems that the dirty transactions are somehow visible to this transaction. Is that possible? Is the dirty transactions using up something? The dirty transactions which are timed out are not releasing the connections properly.

            By the way, I'm using the Arjuna Tx manager. Can that be the cause of my problem? I configured it using the INSTALL manual. Is there any special things to be done? Any suggestion will be greately appreciated.
            Sajid
            PS: when can we expect to have a jboss release with arjuna Tx installed in it. that will erase all the confusions.

            • 3. Re: Transaction not active!!
              Sajid Moinuddin Newbie

              PS: I am using the transaction timeout defined in mbean declaration in jboss-service.xml.
              Is is necessary to set it in jbossjts-properties.xml too?
              sajid

              • 4. Re: Transaction not active!!
                Kevin Conner Master

                If it is happening after 20 seconds then it is unlikely to be a timeout issue, especially as it only appears to happen with the 'dirty transaction'. Your guess as to the cause is likely to be correct.

                Are you able to see which transactions are active in your database? Does your admin tool tell you which locks are held? Which locks are being acquired? Which database are you using?

                What is happening in the 'dirty transaction'? What is happening in your bulk operation?

                Are there any earlier messages in your log files which would indicate any other issue?

                • 5. Re: Transaction not active!!
                  Mark Little Master

                   

                  "sajid2045" wrote:
                  PS: when can we expect to have a jboss release with arjuna Tx installed in it. that will erase all the confusions.


                  What do you mean by this? What confusion? Do you mean during the install process?