org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.wuerth.phoenix.Cis.bc.persistent.jpa.BusinessCardPeer#711]

Hibernate JIRA | Guenther Demetz | 2 years ago
  1. 0

    Until Hibernate4.2 StaleObjectStateExceptions were raised exclusively on flush calls. Now with Hibernate4.3.9 we have StaleObjectStateExceptions too on read calls (CollectionInitialize), which seems unexpected behavior since Hibernate should maintain his repeatable-read behavior. Here a stacktrace: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.wuerth.phoenix.Cis.bc.persistent.jpa.BusinessCardPeer#711] at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.checkVersion(EntityReferenceInitializerImpl.java:499) at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.checkVersion(EntityReferenceInitializerImpl.java:453) at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState(EntityReferenceInitializerImpl.java:209) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.readRow(AbstractRowReader.java:107) at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:129) at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:138) at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:102) at org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:100) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:693) at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:92) at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1933) at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:558) at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:260) at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:554) at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:142) at org.hibernate.collection.internal.PersistentSet.toArray(PersistentSet.java:187) at java.util.Collections$UnmodifiableCollection.toArray(Collections.java:1033) at java.util.ArrayList.<init>(ArrayList.java:177) at com.wuerth.phoenix.cis.tasks.tools.monitors.creditlimitmonitor.CreditLimitMonitorTableModel.getValueAt(CreditLimitMonitorTableModel.java:226) As you can see from the stack we are clearly outside any flush context here, how is that possible? Until now I was not able to reproduce it in a testcase...sorry.

    Hibernate JIRA | 2 years ago | Guenther Demetz
    org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.wuerth.phoenix.Cis.bc.persistent.jpa.BusinessCardPeer#711]
  2. 0

    Until Hibernate4.2 StaleObjectStateExceptions were raised exclusively on flush calls. Now with Hibernate4.3.9 we have StaleObjectStateExceptions too on read calls (CollectionInitialize), which seems unexpected behavior since Hibernate should maintain his repeatable-read behavior. Here a stacktrace: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.wuerth.phoenix.Cis.bc.persistent.jpa.BusinessCardPeer#711] at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.checkVersion(EntityReferenceInitializerImpl.java:499) at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.checkVersion(EntityReferenceInitializerImpl.java:453) at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState(EntityReferenceInitializerImpl.java:209) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.readRow(AbstractRowReader.java:107) at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:129) at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:138) at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:102) at org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:100) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:693) at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:92) at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1933) at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:558) at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:260) at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:554) at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:142) at org.hibernate.collection.internal.PersistentSet.toArray(PersistentSet.java:187) at java.util.Collections$UnmodifiableCollection.toArray(Collections.java:1033) at java.util.ArrayList.<init>(ArrayList.java:177) at com.wuerth.phoenix.cis.tasks.tools.monitors.creditlimitmonitor.CreditLimitMonitorTableModel.getValueAt(CreditLimitMonitorTableModel.java:226) As you can see from the stack we are clearly outside any flush context here, how is that possible? Until now I was not able to reproduce it in a testcase...sorry.

    Hibernate JIRA | 2 years ago | Guenther Demetz
    org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.wuerth.phoenix.Cis.bc.persistent.jpa.BusinessCardPeer#711]
  3. 0

    [HHH-9764] StaleObjectStateExceptions raising outside flush context. - Hibernate JIRA

    atlassian.net | 1 year ago
    org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) :
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate StaleObjectStateException when reading

    Stack Overflow | 1 year ago | DD.
    org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.example.model.Order#95813]
  6. 0

    Case 1: # Start Liferay -> Admin -> Configuration. # Click Content -> Click Web Content. # The console display exception as following: {noformat} 淇℃伅: Starting ProtocolHandler ["ajp-bio-8009"] 2014-2-10 5:20:39 org.apache.catalina.startup.Catalina start 淇℃伅: Server startup in 78481 ms 05:21:43,256 ERROR [http-bio-8080-exec-6][PortalPreferencesImpl:192] java.io.IOException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=3, portalPreferencesId=10455, ownerId=10200, ownerType=4, preferences=<portlet-preferences><preference><name>com.liferay.portal.util.SessionClicks#pa nel-manage-site_administration.configuration</name><value>closed</value></preference><preference><name>com.liferay.portal.util.SessionClicks#panel-manage-site_administration.content</name><value>closed</value></preference><preference><name>com.liferay.portal.util.SessionClicks#p_auth</name><value>F1 87YAN2</value></preference></portlet-preferences>} is stale in comparison to {mvccVersion=4, portalPreferencesId=10455, ownerId=10200, ownerType=4, preferences=<portlet-preferences><preference><name>com.liferay.portal.util.SessionClicks#panel-manage-site_administration.configuration</name><value>ope n</value></preference><preference><name>com.liferay.portal.util.SessionClicks#panel-manage-site_administration.content</name><value>open</value></preference><preference><name>com.liferay.portal.util.SessionClicks#p_auth</name><value>F187YAN2</value></preference></portlet-preferences>} java.io.IOException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=3, portalPreferencesId=10455, ownerId=10200, ownerType=4, preferences=<portlet-preferences><preference><name>com.liferay.portal.util.SessionClicks#panel-manage-site_administration.configuration</name><value>closed</val ue></preference><preference><name>com.liferay.portal.util.SessionClicks#panel-manage-site_administration.content</name><value>closed</value></preference><preference><name>com.liferay.portal.util.SessionClicks#p_auth</name><value>F187YAN2</value></preference></portlet-preferences>} is stale in compar ison to {mvccVersion=4, portalPreferencesId=10455, ownerId=10200, ownerType=4, preferences=<portlet-preferences><preference><name>com.liferay.portal.util.SessionClicks#panel-manage-site_administration.configuration</name><value>open</value></preference><preference><name>com.liferay.portal.util.Sessi onClicks#panel-manage-site_administration.content</name><value>open</value></preference><preference><name>com.liferay.portal.util.SessionClicks#p_auth</name><value>F187YAN2</value></preference></portlet-preferences>} at com.liferay.portlet.PortalPreferencesImpl.store(PortalPreferencesImpl.java:228) at com.liferay.portlet.PortalPreferencesImpl.setValue(PortalPreferencesImpl.java:188) at com.liferay.portal.util.SessionClicks.put(SessionClicks.java:104) at com.liferay.portal.util.SessionClicks.put(SessionClicks.java:77) at com.liferay.portal.action.SessionClickAction.execute(SessionClickAction.java:71) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:173) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:549) at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:526) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:360) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:293) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:226) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:97) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 05:22:11,297 ERROR [http-bio-8080-exec-9][PortalPreferencesImpl:192] java.io.IOException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=6, portalPreferencesId=10455, ownerId=10200, ownerType=4, preferences=<portlet-preferences><preference><name>com.liferay.portal.util.SessionClicks#pa {noformat} Case 2: # Admin -> Content -> Web Content -> Click Configuration. # The console display exception as following: {noformat}05:34:43,317 ERROR [http-bio-8080-exec-3][PortalPreferencesImpl:192] org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.liferay.portal.model.impl.PortalPreferencesImpl] with identifier [10453]: optimistic locking failed; neste ate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.PortalPreferencesImpl#10453] org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.liferay.portal.model.impl.PortalPreferencesImpl] with identifier [10453]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updat transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.PortalPreferencesImpl#10453] at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:672) at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:793) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.processCommit(DefaultTransactionExecutor.java:82) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:70) at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175) at $Proxy242.updatePreferences(Unknown Source) at com.liferay.portal.service.PortalPreferencesLocalServiceUtil.updatePreferences(PortalPreferencesLocalServiceUtil.java:337) at com.liferay.portlet.PortalPreferencesImpl.store(PortalPreferencesImpl.java:224) at com.liferay.portlet.PortalPreferencesImpl.setValue(PortalPreferencesImpl.java:188) at com.liferay.portal.util.SessionClicks.put(SessionClicks.java:104) at com.liferay.portal.util.SessionClicks.put(SessionClicks.java:77) at com.liferay.portal.action.SessionClickAction.execute(SessionClickAction.java:71) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:173) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:549) at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:526) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:360) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:293) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169) at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:226) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:97) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.PortalPreferencesImpl#10453] at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1950) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2595) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2495) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2822) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:656) ... 107 more {noformat} Expected result: There is no exception in the console. Actual result: The console will throw exception.

    Liferay Issues | 3 years ago | Serena Song
    com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=0, uuid=6930d34f-7046-4a2b-b909-4cb21addff80, roleId=10170, companyId=10156, userId=10160, userName=, createDate=Wed Feb 19 15:00:31 UTC 2014, modifiedDate=Wed Feb 19 15:00:31 UTC 2014, classNameId=10004, classPK=10170, name=Organization User, title=, description=<?xml version='1.0' encoding='UTF-8'?><root available-locales="en_US" default-locale="en_US"><Description language-id="en_US">All users who belong to an organization have this role within that organization.</Description></root>, type=3, subtype=} is stale in comparison to {mvccVersion=1, uuid=6930d34f-7046-4a2b-b909-4cb21addff80, roleId=10170, companyId=10156, userId=10160, userName=, createDate=2014-02-19 15:00:31.0, modifiedDate=2014-02-19 15:00:31.0, classNameId=10004, classPK=10170, name=Organization User, title=, description=<?xml version='1.0' encoding='UTF-8'?><root available-locales="en_US" default-locale="en_US"><Description language-id="en_US">All users who belong to an organization have this role within that organization.</Description></root>, type=3, subtype=}

    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.wuerth.phoenix.Cis.bc.persistent.jpa.BusinessCardPeer#711]

      at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.checkVersion()
    2. org.hibernate.loader
      AbstractLoadPlanBasedCollectionInitializer.initialize
      1. org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.checkVersion(EntityReferenceInitializerImpl.java:499)
      2. org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.checkVersion(EntityReferenceInitializerImpl.java:453)
      3. org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState(EntityReferenceInitializerImpl.java:209)
      4. org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.readRow(AbstractRowReader.java:107)
      5. org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:129)
      6. org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:138)
      7. org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:102)
      8. org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:100)
      8 frames
    3. Hibernate
      PersistentSet.toArray
      1. org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:693)
      2. org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:92)
      3. org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1933)
      4. org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:558)
      5. org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:260)
      6. org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:554)
      7. org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:142)
      8. org.hibernate.collection.internal.PersistentSet.toArray(PersistentSet.java:187)
      8 frames
    4. Java RT
      ArrayList.<init>
      1. java.util.Collections$UnmodifiableCollection.toArray(Collections.java:1033)
      2. java.util.ArrayList.<init>(ArrayList.java:177)
      2 frames
    5. com.wuerth.phoenix
      CreditLimitMonitorTableModel.getValueAt
      1. com.wuerth.phoenix.cis.tasks.tools.monitors.creditlimitmonitor.CreditLimitMonitorTableModel.getValueAt(CreditLimitMonitorTableModel.java:226)
      1 frame