• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

org.hibernate.exception.LockAcquisitionException without any explicit lock

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ...

https://coderanch.com/t/415119/Object-Relational-Mapping/java/Deadlock-problems-with-Hibernate-Spring
...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic