Getting error "Can't create child on a synthetic root" in 6.3 | Community
Skip to main content
Level 3
July 13, 2018
Solved

Getting error "Can't create child on a synthetic root" in 6.3

  • July 13, 2018
  • 2 replies
  • 7577 views

Hi All,

I am getting below error in aem 6.3 while trying to post a document to a folder in aem from another application. The same is working fine in aem 6.1. The user account used for this action is having full access.

*ERROR* [10.43.32.4 [1531475997878] POST /content/***/***/files HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.

java.lang.IllegalArgumentException: Can't create child on a synthetic root

at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:1156)

at org.apache.sling.servlets.post.impl.operations.AbstractCreateOperation.deepGetOrCreateNode(AbstractCreateOperation.java:584)

at org.apache.sling.servlets.post.impl.operations.AbstractCreateOperation.processCreate(AbstractCreateOperation.java:107)

at org.apache.sling.servlets.post.impl.operations.ModifyOperation.doRun(ModifyOperation.java:91)

at org.apache.sling.servlets.post.AbstractPostOperation.run(AbstractPostOperation.java:97)

at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:205)

at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:378)

at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)

at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)

at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:156)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375)

at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

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

Can you just check this with admin user or add everyone group to root folder(I do read that you having given full access)?

If this problem still persists then create a case with Support with Referring  CQ-4218938.

-Kautuk

2 replies

Adobe Employee
August 17, 2018

The exception was occurring while AEM is trying to read the grandparent node(2 level above) and it's not able to read that node.

if ( ResourceUtil.isSyntheticResource(parent) ) {

            Resource grandParent = parent.getParent();

            if (grandParent != null) {

                this.create(grandParent, parent.getName(), null);

            } else {

                throw new IllegalArgumentException("Can't create child on a synthetic root");

            }

This was resolved by providing Read/Write access to the user where nodes were created?

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
August 21, 2018

Can you just check this with admin user or add everyone group to root folder(I do read that you having given full access)?

If this problem still persists then create a case with Support with Referring  CQ-4218938.

-Kautuk

Kautuk Sahni