Getting SlingException on screen during save of a Touch UI component having multifield | Community
Skip to main content
Atish_Jain
Level 2
June 24, 2016

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

  • June 24, 2016
  • 4 replies
  • 9451 views

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

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

4 replies

Atish_Jain
Level 2
June 25, 2016
Yes it appears but intermittently on dektop.
kautuk_sahni
Community Manager
Community Manager
June 27, 2016

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-causes-unspecified-er

// 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
Atish_Jain
Level 2
June 27, 2016

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).

Peter_Puzanovs
Community Advisor
Community Advisor
November 3, 2016

Hitting same problem.

How to resolve this?

AEM 6.1 SP2

Regards,

Peter

Jitendra_S_Toma
Level 10
June 27, 2016

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

Regards,

Jitendra

johant27131908
Level 2
May 15, 2018

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

smacdonald2008
Level 10
May 15, 2018

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

Adobe Employee
May 15, 2018

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.