fil512 / stratinit

Automatically exported from code.google.com/p/stratinit
0 stars 0 forks source link

GameEndEvent removeUnitSeen #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Stratinit Update 
Exception   "org.springframework.orm.jpa.JpaOptimisticLockingFailureException: 
org.hibernate.StaleStateException: Batch update returned unexpected row count 
from update [0]; actual row count: 0; expected: 1; nested exception is 
javax.persistence.OptimisticLockException: org.hibernate.StaleStateException: 
Batch update returned unexpected row count from update [0]; actual row count: 
0; expected: 1
    at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:285)
    at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120)
    at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:460)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy37.remove(Unknown Source)
    at com.kenstevens.stratinit.server.remote.event.GameEnder.removeUnitSeen(GameEnder.java:66)
    at com.kenstevens.stratinit.server.remote.event.GameEnder.endGame(GameEnder.java:40)
    at com.kenstevens.stratinit.server.remote.event.EndGameEventUpdate.executeWrite(EndGameEventUpdate.java:16)
    at com.kenstevens.stratinit.server.remote.event.EventUpdate.writeData(EventUpdate.java:36)
    at com.kenstevens.stratinit.server.remote.helper.SynchronizedDataAccess.write(SynchronizedDataAccess.java:27)
    at com.kenstevens.stratinit.server.remote.event.EventUpdate.update(EventUpdate.java:28)
    at com.kenstevens.stratinit.server.remote.event.StratInitUpdaterImpl.endGame(StratInitUpdaterImpl.java:31)
    at com.kenstevens.stratinit.server.remote.event.GameEndEvent.execute(GameEndEvent.java:22)
    at com.kenstevens.stratinit.server.remote.event.Event$1.run(Event.java:35)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
Caused by: javax.persistence.OptimisticLockException: 
org.hibernate.StaleStateException: Batch update returned unexpected row count 
from update [0]; actual row count: 0; expected: 1
    at org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException(AbstractEntityManagerImpl.java:638)
    at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:59)
    at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:456)
    ... 20 more
Caused by: org.hibernate.StaleStateException: Batch update returned unexpected 
row count from update [0]; actual row count: 0; expected: 1
    at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
    at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
    at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)
    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 org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
    at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
    at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)
    ... 21 more

Original issue reported on code.google.com by khstev...@gmail.com on 29 Dec 2010 at 8:18

GoogleCodeExporter commented 8 years ago
Fixed in 1.1.30.
Remove all units from within the same transaction

Original comment by khstev...@gmail.com on 29 Jan 2011 at 11:39