-->
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: Thu May 23, 2013 8:13 am 
Newbie

Joined: Thu May 23, 2013 8:05 am
Posts: 1
Following exceptions are recieved from Hibernate while exeute update query. Could you help us knowing the reason behind the same?
"Caused by: java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource"


Trace:
javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: could not execute update query
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:60)
at com.motorola.nsm.common.fm.aav.AlarmMgrBean.persistAlarms(AlarmMgrBean.java:629)
at com.motorola.nsm.common.fm.EventMgr.persistAlarms(EventMgr.java:1272)
at com.motorola.nsm.common.fm.HeartbeatData$PersistEventsThread.run(HeartbeatData.java:529)
Caused by: org.hibernate.exception.LockAcquisitionException: could not execute update query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:110)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:107)
at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:419)
at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:283)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1168)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:117)
at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:51)
... 3 more
Caused by: java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:98)


Top
 Profile  
 
 Post subject: Re: org.hibernate.exception.LockAcquisitionException:
PostPosted: Wed Jun 05, 2013 8:36 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Here's a good description what the exception means.

http://oracle-error.blogspot.it/2008/10/ora-00060-deadlock-detected-while_20.html

Anyway the cause of the problem seems to be, that you have running 2 concurrent transactions on your oracle database
which went in deadlock by locking some resources in crossed sequence:

transaction 1 locks resource A
transaction 2 locks resource B
transaction 1 wants acquire lock on B, must wait until transaction 2 relases lock on B
transaction 2 wants acquire lock on A, must wait until transaction 1 relases lock on A --> deadlock detected


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.