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?
Hi,
You get this exception when 2 threads concurrently try to write to the same location. Does your code do this?
Views
Replies
Total Likes
Hi,
I'm not sure whether 2 threads concurrently try to write to the same location.
Views
Replies
Total Likes
As Joerg suggests - looks like these threads are attempting to write to the same JCR location.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
Hi,
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)
Ok, you are importing data to this location. Can you enable trace logging on the package "org.jackrabbit.oak.jcr.operations.write" and find out what thread is writing to that location as well?
Do you importers run in parallel?
Views
Replies
Total Likes
How to address it?
Views
Replies
Total Likes
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
[0]
AEM anti pattern: Long running sessions | Things on a content management system
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
Do you have any clue on Language Copies?
Views
Replies
Total Likes
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
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies