6 Replies Latest reply on Oct 22, 2006 6:51 AM by ap_nat

    BatchUpdateException in jms

    ap_nat

      I am using jboss-4.0.4.GA with jboss-messaging-1.0.1.CR4 with oracle 10.1.0.2.0 as the message persistence store. If the PersistenceManager manager is configured for UsingBatchUpdates, it throws a

      java.sql.BatchUpdateException: ORA-03106: fatal two-task communication protocol error

      We are able to replicate this issue using one of the tests. This test tries sending a 12.0 kb message after some 65 smaller messages sent within a time span of 13 seconds on a Microsoft Windows XP [Version 5.1.2600] machine using jdk version 1.4.2_03. On other machines too this test causes this problem.

      Though these steps do not guarantee this error, we are running into it consistently.

      The complete stack trace is as follows:

      java.sql.BatchUpdateException: ORA-03106: fatal two-task communication protocol error
      
       at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
       at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:8739)
       at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:517)
       at org.jboss.messaging.core.plugin.JDBCPersistenceManager.handleBeforePrepare(JDBCPersistenceManager.java:3406)
       at org.jboss.messaging.core.plugin.JDBCPersistenceManager$TransactionCallback.beforePrepare(JDBCPersistenceManager.java:4471)
       at org.jboss.messaging.core.tx.Transaction.prepare(Transaction.java:224)
       at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:381)
       at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:99)
       at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
       at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:723)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:101)
       at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:126)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:999)
       at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:98)
       at org.jboss.remoting.Client.invoke(Client.java:612)
       at org.jboss.remoting.Client.invoke(Client.java:604)
       at org.jboss.jms.client.delegate.DelegateSupport.invoke(DelegateSupport.java:112)
       at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N4986868250254447300.invokeNext(ClientConnectionDelegate$sendTransaction_N4986868250254447300.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:134)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
       at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N4986868250254447300.invokeNext(ClientConnectionDelegate$sendTransaction_N4986868250254447300.java)
       at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
       at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N4986868250254447300.invokeNext(ClientConnectionDelegate$sendTransaction_N4986868250254447300.java)
       at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
       at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N4986868250254447300.invokeNext(ClientConnectionDelegate$sendTransaction_N4986868250254447300.java)
       at org.jboss.jms.client.delegate.ClientConnectionDelegate.sendTransaction(ClientConnectionDelegate.java)
       at org.jboss.jms.tx.ResourceManager.sendTransactionXA(ResourceManager.java:491)
       at org.jboss.jms.tx.ResourceManager.prepare(ResourceManager.java:379)
       at org.jboss.jms.tx.MessagingXAResource.prepare(MessagingXAResource.java:151)
       at org.jboss.tm.TransactionImpl$Resource.prepare(TransactionImpl.java:2212)
       at org.jboss.tm.TransactionImpl.prepareResources(TransactionImpl.java:1660)
       at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:347)
       at org.jboss.tm.TxManager.commit(TxManager.java:240)
       at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
      


        • 1. Re: BatchUpdateException in jms
          timfox

          Can you try disabling batch updates in the pm config and tell me what happens?

          • 2. Re: BatchUpdateException in jms
            timfox

            If the problem does not occur with batch updates turned off, then it would imply to me a problem with the Oracle driver.

            Which driver are you using?

            BTW I have previously experienced problems myself with doing batch updates using the Oracle thin driver - it seems to be fairly buggy.

            • 3. Re: BatchUpdateException in jms
              ap_nat

              Disabling batch updates works. We are using thin oracle driver (oracle.jdbc.driver.OracleDriver) bundled in ojdbc14.jar , the driver version is 10.1.0.2.0. Would tweaking the defaultExecuteBatch parameter on the oracle db connection help in any way?

              • 4. Re: BatchUpdateException in jms
                timfox

                I believe defaultExecuteBatch only works when doing Oracle specific batching which we don't do, so I doubt that would make any difference.

                Can you try upgrading to the latest Oracle driver?

                • 5. Re: BatchUpdateException in jms
                  weston.price

                  You may want to have a look at:

                  http://www.orafaq.com/forum/t/44627/0/

                  At least from the protocol side.

                  • 6. Re: BatchUpdateException in jms
                    ap_nat

                    I have tried running it with 10.2.0.1.0 client with 10.2.0.1.0 server, is there any other version that you want me to try it with. My db too is the same version as the client. Should I run it against the same db with a higher version of the client??

                    Thanks, Weston for the Oracle faq. I did try the approaches given there, but none of that helped me, thatz why I opened this issue.