-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: org.hibernate.exception.LockAcquisitionException
PostPosted: Fri May 04, 2007 4:47 am 
Newbie

Joined: Fri May 04, 2007 4:34 am
Posts: 1
Hello,

I am encountering following deadlock exception in my J2EE (Struts, Spring, Hibernate and EJB based) application:

14:27:07,023 WARN [JDBCExceptionReporter] SQL Error: 1205, SQLState: 40001
14:27:07,023 ERROR [JDBCExceptionReporter] Transaction (Process ID 64) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
14:27:07,023 ERROR [StatDataPrepareDaoImpl] Exception in StatDataPrepareDaoImpl : getStatusData() : org.hibernate.exception.LockAcquisitionException: could not execute query

I am not able to identify the cause of of this deadlock, because all my hibernate queries are "Select" queries only and not of type "update/insert" or delete".

The hibernate queries only read data from a few tables which are updated by some other process/program. I am not sure what could cause LockAcquisitionExceptiont to occur in this case.

Kindly let me know if there are any suggestions to handle/avoid this exception.

Regards,
Ashish


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 21, 2008 6:33 am 
Newbie

Joined: Fri Apr 20, 2007 6:04 am
Posts: 6
This particular message has error 1205 and is a common error in
multi-user applications. What happens is that two connections are
both waiting for resources that are blocked by the other connection.
This situation is know as "deadlock". SQL Server detects this situation,
and selects one of the processes as a victim, and aborts its batch
and transaction.

Occasional deadlocks are nothing to lose sleep over, but if they are
frequent enough, this calls for a review of the the SQL code in the
application.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.