org.springframework.transaction.TransactionSystemException: Could not commit JCR transaction; nested exception is java.util.ConcurrentModificationException

JFrog JIRA | Johan-Kees Vliek | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hi, I've created a script to delete artifacts that haven't been downloaded in a certain period. During the deletion phase Artifactory crashes. The deletion is done using the REST API: http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-DeleteItem At a certain point after deleting a number of files, we get the error in QA (not Production). Error message: 2013-07-19 13:34:33,686 [art-exec-77] [ERROR] (o.a.j.JcrTransactionManager:97) - Could not commit transaction: Could not commit JCR transaction; nested exception is java.util.ConcurrentModificationException 2013-07-19 13:34:33,686 [art-exec-77] [INFO ] (o.a.j.JcrTransactionManager:210) - status = org.springframework.transaction.support.DefaultTransactionStatus@f00ce6d 2013-07-19 13:34:33,687 [art-exec-77] [INFO ] (o.a.j.JcrTransactionManager:210) - txobj = org.springframework.extensions.jcr.jackrabbit.LocalTransactionManager$JcrTransactionObject@3da158a0 2013-07-19 13:34:33,687 [art-exec-77] [INFO ] (o.a.j.JcrTransactionManager:210) - sh = org.springframework.extensions.jcr.jackrabbit.support.UserTxSessionHolder@30d3ffd5 2013-07-19 13:34:33,687 [art-exec-77] [INFO ] (o.a.j.JcrTransactionManager:210) - tx = org.springframework.extensions.jcr.jackrabbit.support.JackRabbitUserTransaction@2e4111fe 2013-07-19 13:34:33,695 [art-exec-77] [ERROR] (o.a.s.a.AsyncAdvice :167) - Could not execute async method: 'public abstract void org.artifactory.repo.service.InternalRepositoryService.markForSaveOnCommit(org.artifactory.repo.RepoPath)'. org.springframework.transaction.TransactionSystemException: Could not commit JCR transaction; nested exception is java.util.ConcurrentModificationException at org.springframework.extensions.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:192) [se-jcr-0.9.jar:na] at org.artifactory.jcr.JcrTransactionManager.doCommit(JcrTransactionManager.java:76) [artifactory-jcr-storage-2.6.6.jar:na] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.artifactory.jcr.lock.aop.LockingAdvice.invoke(LockingAdvice.java:121) [artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:198) [artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.CompoundInvocation.proceed(CompoundInvocation.java:56) [artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:184) [artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice$1.call(AsyncAdvice.java:145) [artifactory-core-2.6.6.jar:na] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_37] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_37] at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:91) [artifactory-jcr-storage-2.6.6.jar:na] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_37] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_37] Caused by: java.util.ConcurrentModificationException: null at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) [na:1.6.0_37] at java.util.HashMap$KeyIterator.next(HashMap.java:828) [na:1.6.0_37] at org.apache.jackrabbit.core.state.FineGrainedISMLocking$LockMap.hasDependency(FineGrainedISMLocking.java:407) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.FineGrainedISMLocking.acquireWriteLock(FineGrainedISMLocking.java:143) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.SharedItemStateManager.acquireWriteLock(SharedItemStateManager.java:1851) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.SharedItemStateManager.access$200(SharedItemStateManager.java:115) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:565) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1460) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:163) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:159) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.XASessionImpl.prepare(XASessionImpl.java:312) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.springframework.extensions.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:91) [se-jcr-0.9.jar:na] at org.springframework.extensions.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:189) [se-jcr-0.9.jar:na] ... 16 common frames omitted

    JFrog JIRA | 4 years ago | Johan-Kees Vliek
    org.springframework.transaction.TransactionSystemException: Could not commit JCR transaction; nested exception is java.util.ConcurrentModificationException
  2. 0

    Hi, I've created a script to delete artifacts that haven't been downloaded in a certain period. During the deletion phase Artifactory crashes. The deletion is done using the REST API: http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-DeleteItem At a certain point after deleting a number of files, we get the error in QA (not Production). Error message: 2013-07-19 13:34:33,686 [art-exec-77] [ERROR] (o.a.j.JcrTransactionManager:97) - Could not commit transaction: Could not commit JCR transaction; nested exception is java.util.ConcurrentModificationException 2013-07-19 13:34:33,686 [art-exec-77] [INFO ] (o.a.j.JcrTransactionManager:210) - status = org.springframework.transaction.support.DefaultTransactionStatus@f00ce6d 2013-07-19 13:34:33,687 [art-exec-77] [INFO ] (o.a.j.JcrTransactionManager:210) - txobj = org.springframework.extensions.jcr.jackrabbit.LocalTransactionManager$JcrTransactionObject@3da158a0 2013-07-19 13:34:33,687 [art-exec-77] [INFO ] (o.a.j.JcrTransactionManager:210) - sh = org.springframework.extensions.jcr.jackrabbit.support.UserTxSessionHolder@30d3ffd5 2013-07-19 13:34:33,687 [art-exec-77] [INFO ] (o.a.j.JcrTransactionManager:210) - tx = org.springframework.extensions.jcr.jackrabbit.support.JackRabbitUserTransaction@2e4111fe 2013-07-19 13:34:33,695 [art-exec-77] [ERROR] (o.a.s.a.AsyncAdvice :167) - Could not execute async method: 'public abstract void org.artifactory.repo.service.InternalRepositoryService.markForSaveOnCommit(org.artifactory.repo.RepoPath)'. org.springframework.transaction.TransactionSystemException: Could not commit JCR transaction; nested exception is java.util.ConcurrentModificationException at org.springframework.extensions.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:192) [se-jcr-0.9.jar:na] at org.artifactory.jcr.JcrTransactionManager.doCommit(JcrTransactionManager.java:76) [artifactory-jcr-storage-2.6.6.jar:na] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) [spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.artifactory.jcr.lock.aop.LockingAdvice.invoke(LockingAdvice.java:121) [artifactory-jcr-storage-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:198) [artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.CompoundInvocation.proceed(CompoundInvocation.java:56) [artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:184) [artifactory-core-2.6.6.jar:na] at org.artifactory.schedule.aop.AsyncAdvice$1.call(AsyncAdvice.java:145) [artifactory-core-2.6.6.jar:na] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_37] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_37] at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:91) [artifactory-jcr-storage-2.6.6.jar:na] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_37] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_37] Caused by: java.util.ConcurrentModificationException: null at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) [na:1.6.0_37] at java.util.HashMap$KeyIterator.next(HashMap.java:828) [na:1.6.0_37] at org.apache.jackrabbit.core.state.FineGrainedISMLocking$LockMap.hasDependency(FineGrainedISMLocking.java:407) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.FineGrainedISMLocking.acquireWriteLock(FineGrainedISMLocking.java:143) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.SharedItemStateManager.acquireWriteLock(SharedItemStateManager.java:1851) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.SharedItemStateManager.access$200(SharedItemStateManager.java:115) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:565) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1460) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:163) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:159) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.apache.jackrabbit.core.XASessionImpl.prepare(XASessionImpl.java:312) [jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e] at org.springframework.extensions.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:91) [se-jcr-0.9.jar:na] at org.springframework.extensions.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:189) [se-jcr-0.9.jar:na] ... 16 common frames omitted

    JFrog JIRA | 4 years ago | Johan-Kees Vliek
    org.springframework.transaction.TransactionSystemException: Could not commit JCR transaction; nested exception is java.util.ConcurrentModificationException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Red5 Error executing call: Service: null Method: closeStream Num Params: 0

    Stack Overflow | 2 years ago | Velocedge
    java.lang.reflect.InvocationTargetException: null
  5. 0

    ConcurrentModificationException during listFiles

    GitHub | 2 years ago | albrechta
    org.hive2hive.processframework.exceptions.ProcessExecutionException: An exception has been catched during execution. See cause for more information.
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. java.util.ConcurrentModificationException

    null

    at java.util.HashMap$HashIterator.nextEntry()
  2. Java RT
    HashMap$KeyIterator.next
    1. java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)[na:1.6.0_37]
    2. java.util.HashMap$KeyIterator.next(HashMap.java:828)[na:1.6.0_37]
    2 frames
  3. Jackrabbit Core
    XASessionImpl.prepare
    1. org.apache.jackrabbit.core.state.FineGrainedISMLocking$LockMap.hasDependency(FineGrainedISMLocking.java:407)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    2. org.apache.jackrabbit.core.state.FineGrainedISMLocking.acquireWriteLock(FineGrainedISMLocking.java:143)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    3. org.apache.jackrabbit.core.state.SharedItemStateManager.acquireWriteLock(SharedItemStateManager.java:1851)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    4. org.apache.jackrabbit.core.state.SharedItemStateManager.access$200(SharedItemStateManager.java:115)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    5. org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:565)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    6. org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1460)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    7. org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:163)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    8. org.apache.jackrabbit.core.TransactionContext.prepare(TransactionContext.java:159)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    9. org.apache.jackrabbit.core.XASessionImpl.prepare(XASessionImpl.java:312)[jackrabbit-core-jfrog-2.2.8e.jar:2.2.8e]
    9 frames
  4. org.springframework.extensions
    LocalTransactionManager.doCommit
    1. org.springframework.extensions.jcr.jackrabbit.support.JackRabbitUserTransaction.commit(JackRabbitUserTransaction.java:91)[se-jcr-0.9.jar:na]
    2. org.springframework.extensions.jcr.jackrabbit.LocalTransactionManager.doCommit(LocalTransactionManager.java:189)[se-jcr-0.9.jar:na]
    2 frames
  5. org.artifactory.jcr
    JcrTransactionManager.doCommit
    1. org.artifactory.jcr.JcrTransactionManager.doCommit(JcrTransactionManager.java:76)[artifactory-jcr-storage-2.6.6.jar:na]
    1 frame
  6. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    2. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    3. org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    4. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    4 frames
  7. org.artifactory.jcr
    LockingAdvice.invoke
    1. org.artifactory.jcr.lock.aop.LockingAdvice.invoke(LockingAdvice.java:121)[artifactory-jcr-storage-2.6.6.jar:na]
    1 frame
  8. org.artifactory.schedule
    AsyncAdvice$1.call
    1. org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:198)[artifactory-core-2.6.6.jar:na]
    2. org.artifactory.schedule.aop.CompoundInvocation.proceed(CompoundInvocation.java:56)[artifactory-core-2.6.6.jar:na]
    3. org.artifactory.schedule.aop.AsyncAdvice.doInvoke(AsyncAdvice.java:184)[artifactory-core-2.6.6.jar:na]
    4. org.artifactory.schedule.aop.AsyncAdvice$1.call(AsyncAdvice.java:145)[artifactory-core-2.6.6.jar:na]
    4 frames
  9. Java RT
    FutureTask.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[na:1.6.0_37]
    2. java.util.concurrent.FutureTask.run(FutureTask.java:138)[na:1.6.0_37]
    2 frames
  10. org.artifactory.schedule
    ArtifactoryConcurrentExecutor$RunnableWrapper.run
    1. org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:91)[artifactory-jcr-storage-2.6.6.jar:na]
    1 frame
  11. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[na:1.6.0_37]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[na:1.6.0_37]
    3. java.lang.Thread.run(Thread.java:662)[na:1.6.0_37]
    3 frames