This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes org.hibernate.exception.LockAcquisitionException without any explicit lock Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "org.hibernate.exception.LockAcquisitionException without any explicit lock" Watch "org.hibernate.exception.LockAcquisitionException without any explicit lock" New topic
Author

org.hibernate.exception.LockAcquisitionException without any explicit lock

avihai marchiano
Ranch Hand

Joined: Jan 10, 2007
Posts: 342
Hey,

using in Jboss, hibernate,spring,ms-sql.
I run multi threaded.

in some cases i get - org.hibernate.exception.LockAcquisitionException.

I dont have any explicit lock either by using in "select for update" or hibernate locking ...
But still when hibernate try to flush (and execute update bedore flush) it throw the exception based on deadlock in detected in the DB.



Again - there is no lock in my code?
so - why hibetrnate or the DB lock? (as far as i know the default for hibernate is optimisitc lock).

Some googeling give "strang advices" like read all the data in the beging for ms-sql server ...

http://www.coderanch.com/t/415119/Object-Relational-Mapping/java/Deadlock-problems-with-Hibernate-Spring
...
 
Have you checked out Aspose?
 
subject: org.hibernate.exception.LockAcquisitionException without any explicit lock
 
It's not a secret anymore!