Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Getting SlingException on screen during save of a Touch UI component having multifield

Avatar

Level 2

Hi, 

I am getting the error as attached with this post (exception.png) on ipad screen.
The error is consistent My component consists comprises of a multifield, when dialog is saved in Touch UI.

I have used granite/ui/components/foundation/form/multifield to implement the same.

Underlying error seen in logs is :
23.06.2016 10:32:46.769 *ERROR* [10.203.101.210 [1466658166738] POST /content/iea/en_us/Generic/_jcr_content/flexi_hero_par/list HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.
org.apache.sling.api.resource.PersistenceException: Unable to commit changes to session.
    at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.commit(JcrResourceProvider.java:482)
    at 
......
......

Caused by: javax.jcr.InvalidItemStateException: OakState0001: Unresolved conflicts in /content/iea/en_us/Generic/jcr:content
    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 sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:116)
    at com.sun.proxy.$Proxy7.save(Unknown Source)
    at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.commit(JcrResourceProvider.java:480)
    ... 120 common frames omitted
Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakState0001: Unresolved conflicts in /content/iea/en_us/Generic/jcr:content
    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.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:531)
    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.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)
    ... 129 common frames omitted

Any help would be appreciated.

Thanks 
Atish Jain

9 Replies

Avatar

Level 2
Yes it appears but intermittently on dektop.

Avatar

Administrator

Hi 

Please refer to these posts, it appears similar to yours:- 

Link:- http://stackoverflow.com/questions/34414692/jcr-persistance-exception-aem

//Comment

    The reason if this exception was in given rights to users. We knew that but didn't eve tried to remove rights and give them back in useradmin menu. We removed and give rights to group everyone and then this     issue was fixed. 
 

and

 

Link:-http://stackoverflow.com/questions/27984155/adobe-cq6-aem6-cut-and-paste-from-one-parsys-to-another-...

// Comment

    There was issues with permissions in groups. Old version of OAK made wrong merge.

    Last hot fix fro AEM 6 was installed. OAK 1.0.8 was installed.

    Such privileges were added:

    rep:privileges="{Name}[jcr:versionManagement,jcr:lockManagement,jcr:modifyProperties]"

 

I hope this would help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 2

Hi Kautuk,

If i am not wrong the links you referred to are for aem 6.0 (oak 1.0.x).

I am running into this issue on 6.2 (oak 1.4.1).

Avatar

Community Advisor

Hitting same problem.

How to resolve this?

AEM 6.1 SP2

Regards,

Peter

Avatar

Level 4

Facing the same problem in AEM 6.3 any leads will be very thankful please suggest.

Avatar

Level 9

It does happen often in AEM and only workaround i have seen is refresh the window and try again.

Regards,

Jitendra

Avatar

Level 2

Hey, I am getting the same issue, has somebody been able to fix it?

Avatar

Level 10

For anyone running into issues - use the latest multi-field - granite/ui/components/coral/foundation/form/multifield. See this article  - Building Experience Manager Components using Granite/Coral Resource Types

Avatar

Employee

This is a case of 2 concurrent threads writing to the same node. Setup a debug logger for 'org.apache.jackrabbit.oak.plugins.commit.ConflictValidator' and identify these 2 operations. It could be a launcher, observationManager etc. and there would be a race condition we need to fix.