javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/dam/fetch123 | Community
Skip to main content
Level 2
October 10, 2017

javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/dam/fetch123

  • October 10, 2017
  • 4 replies
  • 18826 views

Hi All,

I kept files in drop box and I created one cloud service and fetching metadata of files from drop box. While fetching file getting following exception in log javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/dam/fetch123. But its able to fetch metadata successfully. How can I resolve this exception? What I have to do?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

joerghoh
Adobe Employee
Adobe Employee
October 10, 2017

Hi,

You get this exception when 2 threads concurrently try to write to the same location. Does your code do this?

Level 2
October 11, 2017

Hi,

I'm not sure whether 2 threads concurrently try to write to the same location.

Level 2
October 13, 2017

Can you share the complete stacktrace? It will indicate one thread, which participates in this situation. The other might be much harder to spot.

If you can recreate this situation, you should enable loglevel trace on org.apache.jackrabbit.oak.jcr.operations.write; this will log every write activity to the repository including the threadname, which does this action. This together with the exception will clearly indicate which threads are causing this situation.

Jörg


javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/dam/fetch123

at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:237)

at org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:212)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.newRepositoryException(SessionDelegate.java:670)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:496)

at org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.performVoid(SessionImpl.java:419)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:274)

at org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:416)

at com.abc.googledrive.core.importer.Importer.importData(Importer.java:169)

at com.day.cq.polling.importer.impl.PollingImporterImpl.importData(PollingImporterImpl.java:520)

at com.day.cq.polling.importer.impl.PollingImporterImpl.access$000(PollingImporterImpl.java:68)

at com.day.cq.polling.importer.impl.PollingImporterImpl$1.run(PollingImporterImpl.java:422)

at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:118)

at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in /content/dam/copy12345

at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.failOnMergeConflict(ConflictValidator.java:115)

at org.apache.jackrabbit.oak.plugins.commit.ConflictValidator.propertyAdded(ConflictValidator.java:84)

at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.propertyAdded(CompositeEditor.java:83)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.propertyAdded(EditorDiff.java:82)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareProperties(SegmentNodeState.java:592)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:456)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:414)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:414)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.plugins.segment.MapRecord.compare(MapRecord.java:414)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:583)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)

at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:54)

at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)

at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.prepare(SegmentNodeStore.java:496)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.optimisticMerge(SegmentNodeStore.java:519)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit.execute(SegmentNodeStore.java:575)

at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore.merge(SegmentNodeStore.java:238)

at org.apache.jackrabbit.oak.spi.state.ProxyNodeStore.merge(ProxyNodeStore.java:43)

at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:247)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:347)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:494)

... 12 more

Bharath_valse
Level 4
May 16, 2019

Long running sessions might also be the cause for such conflicts as mentioned in [0], Please add debug level logs to the package mentioned by Joerg and additionally add debug level logging around the below packages. This will give more details into the conflict

  • org.apache.jackrabbit.oak.plugins.commit.MergingNodeStateDiff
  • org.apache.jackrabbit.oak.plugins.commit.ConflictValidator
  • org.apache.jackrabbit.oak.api
  • org.apache.jackrabbit.oak.spi.commit
  • org.apache.jackrabbit.oak.jcr.session

[0]

AEM anti pattern: Long running sessions | Things on a content management system

navinkaushal
Level 4
May 17, 2019

Hi @Bharath

This issue we are facing while creating a translation job (with language copies) it should create launch however the launch is not being created.

Will check with debug log.

Thanks

-Navin

February 24, 2020

Do you have any clue on Language Copies?

February 24, 2020

Did you find a solution for this? We also have the same problem in our translation projects such as:

24.02.2020 20:43:31.861 *ERROR* [10.222.101.124 [1582576275042] POST /content/projects/site/site-support---part-2/jcr:content/dashboard/gadgets/translationjob HTTP/1.1] com.adobe.cq.wcm.translation.impl.TranslationObjectImpl Error while saving

javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/projects/site/site-support---part-2/jcr:content/dashboard/gadgets/translationjob