-->
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.  [ 1 post ] 
Author Message
 Post subject: java.sql.BatchUpdateException: ORA-00060: deadlock detected
PostPosted: Sat Mar 07, 2015 8:26 am 
Newbie

Joined: Sat Mar 07, 2015 4:15 am
Posts: 1
2015-01-24 10:54:00,047 236950 [Thread-1] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.LockAcquisitionException: could not update: [com.wdpr.ldp.integration.entity.DriverValueOutputEntity#component[scenarioId,driverId,businessDate]{scenarioId=2, businessDate=2015-05-13 00:00:00, driverId=1937506}]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:87)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2430)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at com.wdpr.ldp.integration.impl.DriverBatchDaoImp.saveDriverValue(DriverBatchDaoImp.java:166)
at com.wdpr.ldp.node.manager.rule.DriverBatchManager.saveDriverValue(DriverBatchManager.java:38)
at com.wdpr.ldp.ddr.manager.DdrExecutionManager.processDdr(DdrExecutionManager.java:117)
at com.wdpr.ldp.ddr.manager.DdrExecutionThreadLauncher.run(DdrExecutionThreadLauncher.java:32)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.BatchUpdateException: ORA-00060: deadlock detected while waiting for resource --can you please any body help me

public void saveDriverValue(final Set<DdrRuleOutput> ddrRuleOutputs)
{
final long beginTime = System.currentTimeMillis();
DriverBatchDaoImp.LOG.trace("Inside saveDriverValue()");

int dbCount = 0;

Session session = null;
Transaction trans = null;

try
{
session = getSessionFactory().openSession();
trans = session.beginTransaction();

final int dataSourceId = getDataSourceId("Derived Driver");
for (final DdrRuleOutput ruleOutput : ddrRuleOutputs)
{
final DriverValueOutputEntity driverValueEntity = this.driverValueHelper.driverValueModelToEntity(ruleOutput, dataSourceId);
session.saveOrUpdate(driverValueEntity);

dbCount++;
if (dbCount % this.batchSize == 0)
{
session.flush();
session.clear();
}
}

session.flush();
session.clear();
}


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

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.