Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 4

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)

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

2 Replies

Avatar

Employee Advisor

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?

Avatar

Correct answer by
Administrator

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