users@glassfish.java.net

DeadLock causes invalid transactions?

From: <glassfish_at_javadesktop.org>
Date: Wed, 25 Nov 2009 08:11:54 PST

MS SQL detects a Dead Lock. So it cancle one of my transactions.

After this GlassFish use this transaction again and MS SQL tells me "New request is not allowed to start because it should come with valid transaction descriptor."

(I'm NOT using any statful bean.)

Any idea what is going wrong, and how I can better handle this failures?

There are some more strange errors in my log:

[#|2009-11-25T15:32:26.326+0000|WARNING|sun-appserver2.1|oracle.toplink.essentials.session.file:/C:/Programme/Glassfish/hadb-glassfish-v2.1/domains/domain1/applications/j2ee-apps/my-ear-1.2-CORE-SNAPSHOT/my-jar-1.2.0-SNAPSHOT_jar/-myPu|_ThreadID=23;_ThreadName=p: thread-pool-1; w: 8;_RequestID=a5f9c805-07f8-423b-a937-687c4314c4db;|
Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: [sunm][SQLServer JDBC Driver][SQLServer]Die Transaktion (Prozess-ID 118) befand sich auf Sperre Ressourcen aufgrund eines anderen Prozesses in einer Deadlocksituation und wurde als Deadlockopfer ausgewählt. Führen Sie die Transaktion erneut aus.
Error Code: 1205

[#|2009-11-25T15:32:26.342+0000|WARNING|sun-appserver2.1|javax.enterprise.system.core.transaction|_ThreadID=23;_ThreadName=p: thread-pool-1; w: 8;_RequestID=a5f9c805-07f8-423b-a937-687c4314c4db;|JTS5064: Unexpected exception occurred while delisting the resource
javax.transaction.xa.XAException: [sunm][SQLServer JDBC Driver][SQLServer]Die neue Anforderung kann nicht gestartet werden, weil sie einen gültigen Transaktionsdeskriptor aufweisen sollte.

[#|2009-11-25T15:32:26.357+0000|SEVERE|sun-appserver2.1|javax.enterprise.system.core.transaction|_ThreadID=23;_ThreadName=p: thread-pool-1; w: 8;org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe;rollback;_RequestID=a5f9c805-07f8-423b-a937-687c4314c4db;|JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [rollback] operation.|#]

[#|2009-11-25T15:32:26.357+0000|INFO|sun-appserver2.1|javax.enterprise.system.container.ejb|_ThreadID=23;_ThreadName=p: thread-pool-1; w: 8;|
javax.ejb.EJBException: nested exception is: javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [rollback] operation. vmcid: 0x0 minor code: 0 completed: No
javax.transaction.SystemException: org.omg.CORBA.INTERNAL: JTS5031: Exception [org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 0 completed: Maybe] on Resource [rollback] operation. vmcid: 0x0 minor code: 0 completed: No

[#|2009-11-25T15:32:26.545+0000|WARNING|sun-appserver2.1|javax.enterprise.system.core.transaction|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=ae1fd4fe-a26a-41f6-902e-f9572a607ab3;|JTS5041: The resource manager is doing work outside a global transaction
javax.transaction.xa.XAException: [sunm][SQLServer JDBC Driver]Transaction has to commit/rollback before another transaction starts.

[#|2009-11-25T15:32:26.545+0000|SEVERE|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=ae1fd4fe-a26a-41f6-902e-f9572a607ab3;|RAR5027:Unexpected exception in resource pooling
javax.transaction.SystemException

[#|2009-11-25T15:32:26.545+0000|WARNING|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=ae1fd4fe-a26a-41f6-902e-f9572a607ab3;|poolmgr.err_enlisting_res_in_getconn|#]

[#|2009-11-25T15:32:26.545+0000|WARNING|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8080-1;mypool;javax.transaction.SystemException;_RequestID=ae1fd4fe-a26a-41f6-902e-f9572a607ab3;|RAR5117 : Failed to obtain/create connection from connection pool [ mypool ]. Reason : javax.transaction.SystemException|#]

[#|2009-11-25T15:32:26.545+0000|WARNING|sun-appserver2.1|javax.enterprise.resource.resourceadapter|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8080-1;Error in allocating a connection. Cause: javax.transaction.SystemException;_RequestID=ae1fd4fe-a26a-41f6-902e-f9572a607ab3;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]

[#|2009-11-25T15:32:26.857+0000|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=23;_ThreadName=p: thread-pool-1; w: 8;|DXAR:start():Warning:Received diff Xid for open txnId:switching transactionId:
DXAR Xid=626F6261666574742C7365727665722C50333730302C0055010000472AF52B626F6261666574742C7365727665722C5033373030
DXAR TXid=4252001868979854336
got Xid=null
got TXid=4252001868980054272|#]
[Message sent by forum member 'hegalor' ]

http://forums.java.net/jive/thread.jspa?messageID=373330