Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

org.hibernate.exception.LockAcquisitionException without any explicit lock  RSS feed

avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ...
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!