Unable to Create a node with cq:component showing 409 | Community
Skip to main content
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 h_kataria

Hi @gokilavani 
If you don't need that specific version, then you can download some older version for the time being and work on it. For e.g I know that it is working till atleast  2024.2.15262.20240224T002940Z  version. So, the issue was probably introduced in some version released after that. 

6 replies

HrishikeshKagne
Community Advisor
Community Advisor
June 13, 2024

Hi @gokilavani ,

A 409 error typically occurs when there is a conflict with the resource you are trying to create. In this case, it seems that the node you are trying to create already exists or there is a naming conflict.

To troubleshoot this issue, you can try the following steps:

1. Verify if the node already exists: Double-check if the node you are trying to create already exists in the specified location. If it does, you may need to choose a different name or delete the existing node before creating a new one.

2. Check the component registration: Ensure that the component you are trying to use is properly registered in the instance. You can verify this by checking the component's registration status in the CRX/DE or by inspecting the package installation status.

3. Verify permissions: Make sure that you have the necessary permissions to create nodes with the specified component. Check the access control policies to ensure that you have the appropriate permissions for creating nodes.

4. Check for naming conflicts: If you are specifying a name for the node, ensure that it does not conflict with any existing nodes or reserved names. Avoid using special characters or reserved words in the node name.

If none of these steps resolve the issue, please provide more details about the specific error message and the steps you are taking to create the node.

Hrishikesh Kagane
Level 2
June 13, 2024

@hrishikeshkagne 

I Have Created the Test node using admin cred, please check the attached Screenshot for reference.

Thank You.

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 13, 2024

Hi, 

Are you creating nodes under path that allow such nodetypes? for example if you create a cq:page node under /content, do you still see the issue?

Esteban Bustamante
Level 2
June 13, 2024

Yes i do . i created a component under /apps  only 

 

even i tried to create a cq:page under /content/myproject/us/en . facing  same issue  here too

 

 

abhishekanand_
Community Advisor
Community Advisor
June 13, 2024

Hi @gokilavani 
can you specify your sdk version over here and also can you tell me is it similar for creating node at any path in crx or just some specific paths?

Abhishek Anand
Level 2
June 14, 2024

Am using the latest version of sdk . here is the sdk

 

aem-sdk-2024.06.16647.20240607T103723Z-240500

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 14, 2024

Programmatically, when you see 409 error, it indicates that a conflict. This can occur when creating a node in AEM CRX. if a node with the same name already exists, or if there are constraints in place that prevent the creation of the node type you're trying to create. 

You can firstly check if the node exist, and if exists, do nothing... or write some other business logic to change the name of the node.

Also as a new developer, I recommend you to learn about System User. A system user is a JCR user with no password set and a minimal set of privileges that are necessary to perform a specific task. Having no password set means that it will not be possible to login with a system user. A system user is typically utilized by the AEM backend code which have privileges to create, read, update, and delete nodes in the JCR; the backend code will authenticate as a system user as a session when needed, and is required to session logout right when the task or tasks have been completed....Very effective.
Full documentation here -> https://sourcedcode.com/blog/aem/create-system-service-users-in-aem-6-5-with-code-configurations



===========+

From your screenshot that you are showing us, it looks like CRX/DE does not like it when that specific nodeType is placed at the path of the JCR. The JCR has rules for which nodes can be added into other nodes vs not.

Level 2
June 14, 2024

@briankasingli , Could you please refer the below screenshot

 

1) i have create the cq:component node but its not listing too in type i have manually entered it and created again but the node created as nt:unstructured. Need help on this 

 

 

 

 

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 14, 2024

Is this local host? AEMaaCS does not allow you to make changes in restricted areas like /apps/*, but on local you can do whatever you want.

On Local, As a test, instead of creating your own nodes, why not copy a structure node that is in the same path root as where you are trying to re-create the nodes.

h_kataria
Community Advisor
Community Advisor
June 14, 2024

I am pretty sure the marked answer is not the correct one. I checked this on latest vanilla SDK (2024.5.16461.20240524T172309Z) as well as on old vanilla SDK (2023.3.11382.20230315T073850Z) and I can reproduce the same on the newer SDK (2024.5.16461.20240524T172309Z)  but it is working fine on the older one.
So this is something introduced with latest versions and a possible bug in the SDKs.
Found a similar post highlighting the same issue : 
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/create-node-in-crxde-lite/m-p/676521 //cc: @kautuk_sahni 

Level 2
June 14, 2024

Yes I can reproduce the same with latest version

h_kataria
Community Advisor
h_katariaCommunity AdvisorAccepted solution
Community Advisor
June 14, 2024

Hi @gokilavani 
If you don't need that specific version, then you can download some older version for the time being and work on it. For e.g I know that it is working till atleast  2024.2.15262.20240224T002940Z  version. So, the issue was probably introduced in some version released after that. 

kautuk_sahni
Community Manager
Community Manager
June 18, 2024

@gokilavani Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni