javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.lbss.charging.ar.domain.model.transaction.BusinessTransaction#9361]

Google Groups | Jakub Čech | 2 years ago
  1. 0

    Asynchronous handling - DB deadlocks and concurrency issues

    Google Groups | 2 years ago | Jakub Čech
    javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.lbss.charging.ar.domain.model.transaction.BusinessTransaction#9361]
  2. 0

    Updating Oracle and MSSQL JDBC-Driver leads to Exception when updating object

    Stack Overflow | 11 months ago | Pascal Petruch
    org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [packagename.classname]
  3. 0

    Description of problem: translate.zanata has been sending off a significant number of errors during a translation session. User has reported error screen is shown, seemingly at random. User activity is using Ctrl+Enter to save and continue, occasionally going back to change already translated entries. This _seems_ to be the cause of the issue, but is difficult to reproduce. Version-Release number of selected component (if applicable): 3.4 org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.zanata.model.Activity#26216] at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2523) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3242) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3140) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3470) at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:393) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:385) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:302) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1240) at org.hibernate.search.impl.FullTextSessionImpl.flush(FullTextSessionImpl.java:342) at sun.reflect.GeneratedMethodAccessor1601.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.persistence.HibernateSessionInvocationHandler.invoke(HibernateSessionInvocationHandler.java:93) at com.sun.proxy.$Proxy181.flush(Unknown Source) at org.zanata.dao.AbstractDAOImpl.flush(AbstractDAOImpl.java:105) at sun.reflect.GeneratedMethodAccessor1600.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) at org.zanata.dao.ActivityDAO_$$_javassist_seam_71.flush(ActivityDAO_$$_javassist_seam_71.java) at org.zanata.service.impl.ActivityServiceImpl.logActivityAlreadyLocked(ActivityServiceImpl.java:167) at org.zanata.service.impl.ActivityServiceImpl.logTextFlowStateUpdate(ActivityServiceImpl.java:196) at sun.reflect.GeneratedMethodAccessor10941.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:97) at org.jboss.seam.util.Work.workInTransaction(Work.java:61) at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) at org.zanata.service.impl.ActivityServiceImpl_$$_javassist_seam_42.logTextFlowStateUpdate(ActivityServiceImpl_$$_javassist_seam_42.java) at sun.reflect.GeneratedMethodAccessor10960.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) at org.jboss.seam.Component.callComponentMethod(Component.java:2317) at org.jboss.seam.core.Events.raiseEvent(Events.java:85) at org.jboss.seam.async.AsynchronousEvent$1.process(AsynchronousEvent.java:33) at org.jboss.seam.async.Asynchronous$ContextualAsynchronousRequest.run(Asynchronous.java:80) at org.jboss.seam.async.AsynchronousEvent.execute(AsynchronousEvent.java:27) at org.jboss.seam.async.TransactionSuccessEvent.afterCompletion(TransactionSuccessEvent.java:24) at org.jboss.seam.transaction.SynchronizationRegistry.afterTransactionCompletion(SynchronizationRegistry.java:42) at org.jboss.seam.transaction.SeSynchronizations.afterTransactionCommit(SeSynchronizations.java:37) at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:57) at org.jboss.seam.util.Work.workInTransaction(Work.java:72) at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) at org.zanata.service.impl.TranslationServiceImpl_$$_javassist_seam_64.translate(TranslationServiceImpl_$$_javassist_seam_64.java) at org.zanata.webtrans.server.rpc.UpdateTransUnitHandler.doTranslation(UpdateTransUnitHandler.java:100) at org.zanata.webtrans.server.rpc.UpdateTransUnitHandler.execute(UpdateTransUnitHandler.java:81) at org.zanata.webtrans.server.rpc.UpdateTransUnitHandler.execute(UpdateTransUnitHandler.java:47) at sun.reflect.GeneratedMethodAccessor10952.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) at org.zanata.webtrans.server.rpc.UpdateTransUnitHandler_$$_javassist_seam_118.execute(UpdateTransUnitHandler_$$_javassist_seam_118.java) at org.zanata.webtrans.server.SeamDispatch.doExecute(SeamDispatch.java:155) at org.zanata.webtrans.server.SeamDispatch.execute(SeamDispatch.java:135) at sun.reflect.GeneratedMethodAccessor10726.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) at org.zanata.webtrans.server.SeamDispatch_$$_javassist_seam_15.execute(SeamDispatch_$$_javassist_seam_15.java) at org.zanata.webtrans.server.GwtDispatchService$1.process(GwtDispatchService.java:47) at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65) at org.zanata.webtrans.server.GwtDispatchService.execute(GwtDispatchService.java:42) at sun.reflect.GeneratedMethodAccessor10725.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248) at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:165) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.zanata.seam.interceptor.MonitoringWrapper.doFilter(MonitoringWrapper.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.zanata.servlet.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:61) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.zanata.servlet.MDCInsertingServletFilter.doFilter(MDCInsertingServletFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) at org.jboss.security.negotiation.NegotiationAuthenticator$WrapperValve.invoke(NegotiationAuthenticator.java:336) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) at org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) at java.lang.Thread.run(Thread.java:744)

    JIRA | 1 year ago | Damian Jansen
    org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.zanata.model.Activity#26216]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unhandled exception: Editing a "currently saving" translation target causes StaleObjectStateException

    https://bugzilla.redhat.com/bugzilla/ | 2 years ago | Damian Jansen
    org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.zanata.model.Activity#26216]
  6. 0

    Occasional exception: StaleObjectStateException: Row was updated or deleted by another transaction... [org.zanata.model.Activity#3716]

    https://bugzilla.redhat.com/bugzilla/ | 3 years ago | Sean Flanigan
    org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.zanata.model.Activity#3716]

  1. Tahir 1 times, last 2 months ago
  2. Tahir 1 times, last 2 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.hibernate.StaleObjectStateException

    Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.lbss.charging.ar.domain.model.transaction.BusinessTransaction#9361]

    at org.hibernate.persister.entity.AbstractEntityPersister.check()
  2. Hibernate
    SessionImpl.flush
    1. org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2541)
    2. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3285)
    3. org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3183)
    4. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3525)
    5. org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:159)
    6. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
    7. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:349)
    8. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
    9. org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
    10. org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222)
    10 frames
  3. org.hibernate.jpa
    AbstractEntityManagerImpl.flush
    1. org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1335)
    1 frame
  4. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    3. java.lang.reflect.Method.invoke(Unknown Source)
    3 frames
  5. Spring ORM
    SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke
    1. org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:241)
    1 frame
  6. com.sun.proxy
    $Proxy112.flush
    1. com.sun.proxy.$Proxy112.flush(Unknown Source)
    1 frame
  7. org.axonframework.saga
    AsyncSagaEventProcessor.onEvent
    1. org.axonframework.saga.repository.jpa.JpaSagaRepository.storeAssociationValue(JpaSagaRepository.java:125)
    2. org.axonframework.saga.repository.AbstractSagaRepository.add(AbstractSagaRepository.java:48)
    3. org.axonframework.saga.annotation.AsyncSagaEventProcessor.persistProcessedSagas(AsyncSagaEventProcessor.java:219)
    4. org.axonframework.saga.annotation.AsyncSagaEventProcessor.doProcessEvent(AsyncSagaEventProcessor.java:147)
    5. org.axonframework.saga.annotation.AsyncSagaEventProcessor.onEvent(AsyncSagaEventProcessor.java:118)
    6. org.axonframework.saga.annotation.AsyncSagaEventProcessor.onEvent(AsyncSagaEventProcessor.java:49)
    6 frames
  8. Disruptor Framework
    BatchEventProcessor.run
    1. com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:133)
    1 frame
  9. org.axonframework.saga
    AsyncAnnotatedSagaManager$StartDetectingRunnable.run
    1. org.axonframework.saga.annotation.AsyncAnnotatedSagaManager$StartDetectingRunnable.run(AsyncAnnotatedSagaManager.java:478)
    1 frame
  10. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    3. java.lang.Thread.run(Unknown Source)
    3 frames