org.springframework.transaction.TransactionSystemException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • After metadata has already been updated by another thread which removed and added it (xmlImport), the remove by a thread waiting on the lock (inside its own tx) fails because the original item no longer exists. Need to re-read the new value before deleting it to refresh the state? org.springframework.transaction.TransactionSystemException: Could not commit JCR transaction; nested exception is javax.transaction.RollbackException: javax.transaction.xa.XAException at org.springmodules.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:195) at org.artifactory.jcr.JcrTransactionManager.doCommit(JcrTransactionManager.java:85) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678) 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.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.service.RepositoryServiceImpl$$EnhancerByCGLIB$$79b65f35.getResourceStreamHandle(<generated>) at org.artifactory.engine.DownloadEngine.respond(DownloadEngine.java:509) at org.artifactory.engine.DownloadEngine.processStandard(DownloadEngine.java:195) at org.artifactory.engine.DownloadEngine.process(DownloadEngine.java:115) at org.artifactory.test.SimpleArtifactoryTest.simpleJarDownload(SimpleArtifactoryTest.java:31) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: javax.transaction.RollbackException: javax.transaction.xa.XAException at org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:111) at org.springmodules.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:192) ... 26 more Caused by: javax.transaction.xa.XAException at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:155) at org.apache.jackrabbit.core.XASessionImpl.prepare(XASessionImpl.java:324) at org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:101) ... 27 more Caused by: org.apache.jackrabbit.core.TransactionException: Unable to prepare transaction. at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:152) at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:138) ... 29 more Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: 46254760-0ca4-4cf2-ae4c-3560e4e97d9e/{http://www.jcp.org/jcr/1.0}mimeType has been modified externally at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:620) at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:843) at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:146) ... 30 more ... Removed 11 stack frames
    via by Yoav Landman,
  • After metadata has already been updated by another thread which removed and added it (xmlImport), the remove by a thread waiting on the lock (inside its own tx) fails because the original item no longer exists. Need to re-read the new value before deleting it to refresh the state? org.springframework.transaction.TransactionSystemException: Could not commit JCR transaction; nested exception is javax.transaction.RollbackException: javax.transaction.xa.XAException at org.springmodules.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:195) at org.artifactory.jcr.JcrTransactionManager.doCommit(JcrTransactionManager.java:85) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678) 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.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.service.RepositoryServiceImpl$$EnhancerByCGLIB$$79b65f35.getResourceStreamHandle(<generated>) at org.artifactory.engine.DownloadEngine.respond(DownloadEngine.java:509) at org.artifactory.engine.DownloadEngine.processStandard(DownloadEngine.java:195) at org.artifactory.engine.DownloadEngine.process(DownloadEngine.java:115) at org.artifactory.test.SimpleArtifactoryTest.simpleJarDownload(SimpleArtifactoryTest.java:31) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: javax.transaction.RollbackException: javax.transaction.xa.XAException at org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:111) at org.springmodules.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:192) ... 26 more Caused by: javax.transaction.xa.XAException at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:155) at org.apache.jackrabbit.core.XASessionImpl.prepare(XASessionImpl.java:324) at org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:101) ... 27 more Caused by: org.apache.jackrabbit.core.TransactionException: Unable to prepare transaction. at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:152) at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:138) ... 29 more Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: 46254760-0ca4-4cf2-ae4c-3560e4e97d9e/{http://www.jcp.org/jcr/1.0}mimeType has been modified externally at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:620) at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:843) at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:146) ... 30 more ... Removed 11 stack frames
    via by Yoav Landman,
    • org.springframework.transaction.TransactionSystemException: Could not commit JCR transaction; nested exception is javax.transaction.RollbackException: javax.transaction.xa.XAException at org.springmodules.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:195) at org.artifactory.jcr.JcrTransactionManager.doCommit(JcrTransactionManager.java:85) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678) 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.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.service.RepositoryServiceImpl$$EnhancerByCGLIB$$79b65f35.getResourceStreamHandle(<generated>) at org.artifactory.engine.DownloadEngine.respond(DownloadEngine.java:509) at org.artifactory.engine.DownloadEngine.processStandard(DownloadEngine.java:195) at org.artifactory.engine.DownloadEngine.process(DownloadEngine.java:115) at org.artifactory.test.SimpleArtifactoryTest.simpleJarDownload(SimpleArtifactoryTest.java:31) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: javax.transaction.RollbackException: javax.transaction.xa.XAException at org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:111) at org.springmodules.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:192) ... 16 more Caused by: javax.transaction.xa.XAException at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:155) at org.apache.jackrabbit.core.XASessionImpl.prepare(XASessionImpl.java:324) at org.springmodules.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:101) ... 18 more Caused by: org.apache.jackrabbit.core.TransactionException: Unable to prepare transaction. at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:152) at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:138) ... 21 more Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: 46254760-0ca4-4cf2-ae4c-3560e4e97d9e/{http://www.jcp.org/jcr/1.0}mimeType has been modified externally at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:620) at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:843) at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:146) ... 23 more
    No Bugmate found.