Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.0, 2.0 Technology Preview
-
Fix Version/s: 1.0.1, 2.0 Technology Preview
-
Component/s: scheduler-Core
-
- Description:
-
HideWhen running the following code :
//@Override
public void taskStateUpdatedEvent(final NotificationData<TaskInfo> notificationData) {
if (notificationData.getEventType().equals(SchedulerEvent.TASK_RUNNING_TO_FINISHED)) {
final JobId jobId = notificationData.getData().getTaskId().getJobId();
final String taskName = notificationData.getData().getTaskId().getReadableName();
try {
final TaskResult result = SchedulerClient.userSchedulerInterface.getTaskResult(jobId, taskName);
this.handler.handle(result);
} catch (Throwable e) {
System.out.println("SchedulerListener.taskStateUpdatedEvent() ---> unable to get the result for the task " + taskName + ": " + e + " Current Thread: " + Thread.currentThread() );
e.printStackTrace();
}
}
}
SchedulerListener.taskStateUpdatedEvent() ---> unable to get the result for the task Bucket82: org.ow2.proactive.scheduler.core.db.DatabaseManagerException: Unable to recover the objects ! Current Thread:
Thread[SchedulerListener on rmi://optimus.activeeon.com:1099/Node530408399,6,main]
org.ow2.proactive.scheduler.core.db.DatabaseManagerException: Unable to recover the objects !
at org.ow2.proactive.scheduler.core.db.DatabaseManager.recover(DatabaseManager.java:293)
at org.ow2.proactive.scheduler.core.SchedulerCore.getTaskResult(SchedulerCore.java:1526)
at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:395)
at org.objectweb.proactive.core.body.request.RequestImpl.serveInternal(RequestImpl.java:230)
at org.objectweb.proactive.core.body.request.RequestImpl.serve(RequestImpl.java:174)
at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serveInternal(BodyImpl.java:562)
at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serve(BodyImpl.java:525)
at org.objectweb.proactive.core.body.AbstractBody.serve(AbstractBody.java:922)
at org.objectweb.proactive.core.body.request.RequestReceiverImpl.receiveRequest(RequestReceiverImpl.java:101)
at org.objectweb.proactive.core.body.BodyImpl.internalReceiveRequest(BodyImpl.java:286)
at org.objectweb.proactive.core.body.AbstractBody.receiveRequest(AbstractBody.java:351)
at org.objectweb.proactive.core.body.request.RequestImpl.sendRequest(RequestImpl.java:308)
at org.objectweb.proactive.core.body.request.RequestImpl.send(RequestImpl.java:161)
at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.sendRequest(BodyImpl.java:697)
at org.objectweb.proactive.core.body.AbstractBody.sendRequest(AbstractBody.java:970)
at org.objectweb.proactive.core.body.proxy.UniversalBodyProxy.sendRequestInternal(UniversalBodyProxy.java:414)
at org.objectweb.proactive.core.body.proxy.UniversalBodyProxy.sendRequest(UniversalBodyProxy.java:387)
at org.objectweb.proactive.core.body.proxy.UniversalBodyProxy.sendRequest(UniversalBodyProxy.java:341)
at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reifyAsSynchronous(AbstractBodyProxy.java:269)
at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.invokeOnBody(AbstractBodyProxy.java:163)
at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reify(AbstractBodyProxy.java:118)
at pa.stub.org.ow2.proactive.scheduler.core._StubSchedulerCore.getTaskResult(_StubSchedulerCore.java)
at org.ow2.proactive.scheduler.core.SchedulerFrontend.getTaskResult(SchedulerFrontend.java:433)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:395)
at org.objectweb.proactive.core.body.request.RequestImpl.serveInternal(RequestImpl.java:230)
at org.objectweb.proactive.core.body.request.RequestImpl.serve(RequestImpl.java:174)
at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serveInternal(BodyImpl.java:562)
at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serve(BodyImpl.java:525)
at org.objectweb.proactive.core.body.AbstractBody.serve(AbstractBody.java:922)
at org.objectweb.proactive.core.body.request.RequestReceiverImpl.receiveRequest(RequestReceiverImpl.java:101)
at org.objectweb.proactive.core.body.BodyImpl.internalReceiveRequest(BodyImpl.java:286)
at org.objectweb.proactive.core.body.AbstractBody.receiveRequest(AbstractBody.java:351)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:395)
at org.objectweb.proactive.core.remoteobject.RemoteObjectImpl.receiveMessage(RemoteObjectImpl.java:111)
at org.objectweb.proactive.core.remoteobject.InternalRemoteRemoteObjectImpl.receiveMessage(InternalRemoteRemoteObjectImpl.java:150)
at org.objectweb.proactive.core.remoteobject.rmi.RmiRemoteObjectImpl.receiveMessage(RmiRemoteObjectImpl.java:80)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.exception.LockAcquisitionException: could not load an entity: [org.ow2.proactive.scheduler.task.TaskIdImpl#459147]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:105)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1895)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:71)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:65)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3072)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:434)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:415)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:165)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:207)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:905)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:873)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:590)
at org.hibernate.type.EntityType.resolve(EntityType.java:412)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
at org.hibernate.loader.Loader.doQuery(Loader.java:752)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.ow2.proactive.scheduler.core.db.DatabaseManager.recover(DatabaseManager.java:290)
... 54 more
Caused by: java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
Lock : ROW, JOB_ID, (1,8)
Waiting XID : {2096, S} , SCHEDULER, select taskidimpl0_.hibernateId as hibernat1_9_1_, taskidimpl0_.ID as ID9_1_, taskidimpl0_.jobId_hibernateId as jobId4_9_1_, taskidimpl0_.READABLE_NAME as READABLE3_9_1_, jobidimpl1_.hibernateId as hibernat1_2_0_, jobidimpl1_.ID as ID2_0_, jobidimpl1_.READABLE_NAME as READABLE3_2_0_ from TASK_ID taskidimpl0_ left outer join JOB_ID jobidimpl1_ on taskidimpl0_.jobId_hibernateId=jobidimpl1_.hibernateId where taskidimpl0_.hibernateId=?
Granted XID : {2163, X}
Lock : ROW, TASK_ID, (7,28)
Waiting XID : {2163, X} , SCHEDULER, update TASK_ID set ID=?, jobId_hibernateId=?, READABLE_NAME=? where hibernateId=?
Granted XID : {2096, S}
. The selected victim is XID : 2096.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
at org.hibernate.loader.Loader.doQuery(Loader.java:720)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1881)
... 79 more
Caused by: ERROR 40001: A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
Lock : ROW, JOB_ID, (1,8)
Waiting XID : {2096, S} , SCHEDULER, select taskidimpl0_.hibernateId as hibernat1_9_1_, taskidimpl0_.ID as ID9_1_, taskidimpl0_.jobId_hibernateId as jobId4_9_1_, taskidimpl0_.READABLE_NAME as READABLE3_9_1_, jobidimpl1_.hibernateId as hibernat1_2_0_, jobidimpl1_.ID as ID2_0_, jobidimpl1_.READABLE_NAME as READABLE3_2_0_ from TASK_ID taskidimpl0_ left outer join JOB_ID jobidimpl1_ on taskidimpl0_.jobId_hibernateId=jobidimpl1_.hibernateId where taskidimpl0_.hibernateId=?
Granted XID : {2163, X}
Lock : ROW, TASK_ID, (7,28)
Waiting XID : {2163, X} , SCHEDULER, update TASK_ID set ID=?, jobId_hibernateId=?, READABLE_NAME=? where hibernateId=?
Granted XID : {2096, S}
. The selected victim is XID : 2096.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.services.locks.Deadlock.buildException(Unknown Source)
at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown Source)
at org.apache.derby.impl.services.locks.AbstractPool.lockObject(Unknown Source)
at org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(Unknown Source)
at org.apache.derby.impl.store.raw.xact.RowLocking2.lockRecordForRead(Unknown Source)
at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source)
at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source)
at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(Unknown Source)
at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanRow(Unknown Source)
at org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanRow(Unknown Source)
at org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(Unknown Source)
at org.apache.derby.impl.store.access.btree.BTreeScan.fetchNext(Unknown Source)
at org.apache.derby.impl.sql.execute.TableScanResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.NestedLoopLeftOuterJoinResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown Source)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown Source)
... 84 moreShowWhen running the following code : //@Override public void taskStateUpdatedEvent(final NotificationData<TaskInfo> notificationData) { if (notificationData.getEventType().equals(SchedulerEvent.TASK_RUNNING_TO_FINISHED)) { final JobId jobId = notificationData.getData().getTaskId().getJobId(); final String taskName = notificationData.getData().getTaskId().getReadableName(); try { final TaskResult result = SchedulerClient.userSchedulerInterface.getTaskResult(jobId, taskName); this.handler.handle(result); } catch (Throwable e) { System.out.println("SchedulerListener.taskStateUpdatedEvent() ---> unable to get the result for the task " + taskName + ": " + e + " Current Thread: " + Thread.currentThread() ); e.printStackTrace(); } } } SchedulerListener.taskStateUpdatedEvent() ---> unable to get the result for the task Bucket82: org.ow2.proactive.scheduler.core.db.DatabaseManagerException: Unable to recover the objects ! Current Thread: Thread[SchedulerListener on rmi://optimus.activeeon.com:1099/Node530408399,6,main] org.ow2.proactive.scheduler.core.db.DatabaseManagerException: Unable to recover the objects ! at org.ow2.proactive.scheduler.core.db.DatabaseManager.recover(DatabaseManager.java:293) at org.ow2.proactive.scheduler.core.SchedulerCore.getTaskResult(SchedulerCore.java:1526) at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:395) at org.objectweb.proactive.core.body.request.RequestImpl.serveInternal(RequestImpl.java:230) at org.objectweb.proactive.core.body.request.RequestImpl.serve(RequestImpl.java:174) at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serveInternal(BodyImpl.java:562) at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serve(BodyImpl.java:525) at org.objectweb.proactive.core.body.AbstractBody.serve(AbstractBody.java:922) at org.objectweb.proactive.core.body.request.RequestReceiverImpl.receiveRequest(RequestReceiverImpl.java:101) at org.objectweb.proactive.core.body.BodyImpl.internalReceiveRequest(BodyImpl.java:286) at org.objectweb.proactive.core.body.AbstractBody.receiveRequest(AbstractBody.java:351) at org.objectweb.proactive.core.body.request.RequestImpl.sendRequest(RequestImpl.java:308) at org.objectweb.proactive.core.body.request.RequestImpl.send(RequestImpl.java:161) at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.sendRequest(BodyImpl.java:697) at org.objectweb.proactive.core.body.AbstractBody.sendRequest(AbstractBody.java:970) at org.objectweb.proactive.core.body.proxy.UniversalBodyProxy.sendRequestInternal(UniversalBodyProxy.java:414) at org.objectweb.proactive.core.body.proxy.UniversalBodyProxy.sendRequest(UniversalBodyProxy.java:387) at org.objectweb.proactive.core.body.proxy.UniversalBodyProxy.sendRequest(UniversalBodyProxy.java:341) at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reifyAsSynchronous(AbstractBodyProxy.java:269) at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.invokeOnBody(AbstractBodyProxy.java:163) at org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reify(AbstractBodyProxy.java:118) at pa.stub.org.ow2.proactive.scheduler.core._StubSchedulerCore.getTaskResult(_StubSchedulerCore.java) at org.ow2.proactive.scheduler.core.SchedulerFrontend.getTaskResult(SchedulerFrontend.java:433) at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:395) at org.objectweb.proactive.core.body.request.RequestImpl.serveInternal(RequestImpl.java:230) at org.objectweb.proactive.core.body.request.RequestImpl.serve(RequestImpl.java:174) at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serveInternal(BodyImpl.java:562) at org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serve(BodyImpl.java:525) at org.objectweb.proactive.core.body.AbstractBody.serve(AbstractBody.java:922) at org.objectweb.proactive.core.body.request.RequestReceiverImpl.receiveRequest(RequestReceiverImpl.java:101) at org.objectweb.proactive.core.body.BodyImpl.internalReceiveRequest(BodyImpl.java:286) at org.objectweb.proactive.core.body.AbstractBody.receiveRequest(AbstractBody.java:351) at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:395) at org.objectweb.proactive.core.remoteobject.RemoteObjectImpl.receiveMessage(RemoteObjectImpl.java:111) at org.objectweb.proactive.core.remoteobject.InternalRemoteRemoteObjectImpl.receiveMessage(InternalRemoteRemoteObjectImpl.java:150) at org.objectweb.proactive.core.remoteobject.rmi.RmiRemoteObjectImpl.receiveMessage(RmiRemoteObjectImpl.java:80) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) at java.lang.Thread.run(Thread.java:595) Caused by: org.hibernate.exception.LockAcquisitionException: could not load an entity: [org.ow2.proactive.scheduler.task.TaskIdImpl#459147] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:105) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.loader.Loader.loadEntity(Loader.java:1895) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:71) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:65) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3072) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:434) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:415) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:165) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:207) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:905) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:873) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:590) at org.hibernate.type.EntityType.resolve(EntityType.java:412) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877) at org.hibernate.loader.Loader.doQuery(Loader.java:752) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.doList(Loader.java:2228) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125) at org.hibernate.loader.Loader.list(Loader.java:2120) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.ow2.proactive.scheduler.core.db.DatabaseManager.recover(DatabaseManager.java:290) ... 54 more Caused by: java.sql.SQLException: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, JOB_ID, (1,8) Waiting XID : {2096, S} , SCHEDULER, select taskidimpl0_.hibernateId as hibernat1_9_1_, taskidimpl0_.ID as ID9_1_, taskidimpl0_.jobId_hibernateId as jobId4_9_1_, taskidimpl0_.READABLE_NAME as READABLE3_9_1_, jobidimpl1_.hibernateId as hibernat1_2_0_, jobidimpl1_.ID as ID2_0_, jobidimpl1_.READABLE_NAME as READABLE3_2_0_ from TASK_ID taskidimpl0_ left outer join JOB_ID jobidimpl1_ on taskidimpl0_.jobId_hibernateId=jobidimpl1_.hibernateId where taskidimpl0_.hibernateId=? Granted XID : {2163, X} Lock : ROW, TASK_ID, (7,28) Waiting XID : {2163, X} , SCHEDULER, update TASK_ID set ID=?, jobId_hibernateId=?, READABLE_NAME=? where hibernateId=? Granted XID : {2096, S} . The selected victim is XID : 2096. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown Source) at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source) at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source) at org.hibernate.loader.Loader.doQuery(Loader.java:720) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.loadEntity(Loader.java:1881) ... 79 more Caused by: ERROR 40001: A lock could not be obtained due to a deadlock, cycle of locks and waiters is: Lock : ROW, JOB_ID, (1,8) Waiting XID : {2096, S} , SCHEDULER, select taskidimpl0_.hibernateId as hibernat1_9_1_, taskidimpl0_.ID as ID9_1_, taskidimpl0_.jobId_hibernateId as jobId4_9_1_, taskidimpl0_.READABLE_NAME as READABLE3_9_1_, jobidimpl1_.hibernateId as hibernat1_2_0_, jobidimpl1_.ID as ID2_0_, jobidimpl1_.READABLE_NAME as READABLE3_2_0_ from TASK_ID taskidimpl0_ left outer join JOB_ID jobidimpl1_ on taskidimpl0_.jobId_hibernateId=jobidimpl1_.hibernateId where taskidimpl0_.hibernateId=? Granted XID : {2163, X} Lock : ROW, TASK_ID, (7,28) Waiting XID : {2163, X} , SCHEDULER, update TASK_ID set ID=?, jobId_hibernateId=?, READABLE_NAME=? where hibernateId=? Granted XID : {2096, S} . The selected victim is XID : 2096. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.services.locks.Deadlock.buildException(Unknown Source) at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown Source) at org.apache.derby.impl.services.locks.AbstractPool.lockObject(Unknown Source) at org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(Unknown Source) at org.apache.derby.impl.store.raw.xact.RowLocking2.lockRecordForRead(Unknown Source) at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source) at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source) at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(Unknown Source) at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanRow(Unknown Source) at org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanRow(Unknown Source) at org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(Unknown Source) at org.apache.derby.impl.store.access.btree.BTreeScan.fetchNext(Unknown Source) at org.apache.derby.impl.sql.execute.TableScanResultSet.getNextRowCore(Unknown Source) at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowCore(Unknown Source) at org.apache.derby.impl.sql.execute.NestedLoopLeftOuterJoinResultSet.getNextRowCore(Unknown Source) at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown Source) at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown Source) ... 84 more
SCHEDULING-276SCHEDULING-276