0 Replies Latest reply on Jul 8, 2018 9:05 PM by Alex Raju

    Frequest SQLException Deadlocks after starting application deployed in JBOSS 5.2

    Alex Raju Newbie

      Hello All,

       

      I would like to get your help in getting a solution for the issue I am facing. We have an application which was earlier in Jboss5.1 which we are now moving to Jboss5.2. The application is moved and working fine in Jboss5.2. However, we are noticing frequent SQLException with SQLSate4001 for deadlock. With the large volume of data this might impact the application, hence can you please help in resolving this issue. The stack trace of the exception is as follows:

       

      2018-07-08 19:12:36,965 WARN  [org.jboss.messaging.core.impl.JDBCSupport] SQLException caught, SQLState 40001 code:1205- assuming deadlock detected, try:1

      java.sql.SQLException: Transaction (Process ID 270) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

        at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)

        at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2886)

        at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2328)

        at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:638)

        at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:614)

        at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:573)

        at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:707)

        at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)

        at org.jboss.messaging.core.impl.JDBCPersistenceManager.deleteMessagesNonTx(JDBCPersistenceManager.java:3151)

        at org.jboss.messaging.core.impl.JDBCPersistenceManager.access$400(JDBCPersistenceManager.java:62)

        at org.jboss.messaging.core.impl.JDBCPersistenceManager$1HandleBeforeCommit1PCRunner.doTransaction(JDBCPersistenceManager.java:2169)

        at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:658)

        at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:698)

        at org.jboss.messaging.core.impl.JDBCPersistenceManager.handleBeforeCommit1PC(JDBCPersistenceManager.java:2211)

        at org.jboss.messaging.core.impl.JDBCPersistenceManager$TransactionCallback.beforeCommit(JDBCPersistenceManager.java:3384)

        at org.jboss.messaging.core.impl.tx.Transaction.commit(Transaction.java:223)

        at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:517)

        at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:106)

        at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeTarget(ConnectionAdvised$sendTransaction_N3268650789275322226.java)

        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

        at org.jboss.jms.server.container.SecurityAspect.handleSendTransaction(SecurityAspect.java:200)

        at sun.reflect.GeneratedMethodAccessor388.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)

        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

        at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)

        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

        at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.sendTransaction(ConnectionAdvised.java)

        at org.jboss.jms.wireformat.ConnectionSendTransactionRequest.serverInvoke(ConnectionSendTransactionRequest.java:86)

        at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:165)

        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)

        at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)

        at org.jboss.remoting.Client.invoke(Client.java:2084)

        at org.jboss.remoting.Client.invoke(Client.java:879)

        at org.jboss.remoting.Client.invoke(Client.java:867)

        at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)

        at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)

        at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$sendTransaction$aop(ClientConnectionDelegate.java:241)

        at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeTarget(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)

        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

        at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)

        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

        at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)

        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

        at org.jboss.jms.client.delegate.ClientConnectionDelegate.sendTransaction(ClientConnectionDelegate.java)

        at org.jboss.jms.tx.ResourceManager.commitLocal(ResourceManager.java:207)

        at org.jboss.jms.client.container.SessionAspect.handleCommit(SessionAspect.java:615)

        at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleCommit_1204946386.invoke(SessionAspect_z_handleCommit_1204946386.java)

        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

        at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)

        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

        at org.jboss.jms.client.delegate.ClientSessionDelegate.commit(ClientSessionDelegate.java)

        at org.jboss.jms.client.JBossSession.commit(JBossSession.java:164)

        at org.jboss.resource.adapter.jms.inflow.JmsServerSession$LocalDemarcationStrategy.end(JmsServerSession.java:494)

        at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:245)

        at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)

        at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:745)