OptimisticLockException in ServiceRegistry.cleanRunningJobs

Steps to reproduce

Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 11.254 sec <<< FAILURE! - in org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImplTest
testHostAddedToPriorityListExceptWorkflowType(org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImplTest) Time elapsed: 2.154 sec <<< ERROR!
java.lang.IllegalStateException: Unable to unregister host http://localhost:8080 from the service registry
at org.eclipse.persistence.exceptions.OptimisticLockException.objectChangedSinceLastReadWhenUpdating(OptimisticLockException.java:144)
at org.eclipse.persistence.descriptors.VersionLockingPolicy.validateUpdate(VersionLockingPolicy.java:790)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1086)
at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84)
at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:301)
at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904)
at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:803)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1790)
at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:273)
at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:131)
at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4260)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1441)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1531)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:278)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169)
at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:134)
at org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImpl.cleanRunningJobs(ServiceRegistryJpaImpl.java:1437)
at org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImpl.unRegisterService(ServiceRegistryJpaImpl.java:1339)
at org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImpl.unregisterHost(ServiceRegistryJpaImpl.java:1121)
at org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImpl.deactivate(ServiceRegistryJpaImpl.java:361)
at org.opencastproject.serviceregistry.impl.ServiceRegistryJpaImplTest.tearDown(ServiceRegistryJpaImplTest.java:114)

Activity

Show:
Former user
July 20, 2016, 8:56 PM

Merged PR #1118 () as b5e64f0

Fixed and reviewed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Lars Kiesow

Reporter

Lars Kiesow

Severity

Crash/Hang