javax.jcr.nodetype.ConstraintViolationException: OakConstraint0001: No matching definition found for child node for property [nt:unstructured] | Community
Skip to main content
Level 4
June 15, 2023
Solved

javax.jcr.nodetype.ConstraintViolationException: OakConstraint0001: No matching definition found for child node for property [nt:unstructured]

  • June 15, 2023
  • 2 replies
  • 2753 views

I'm trying to commit a user session using Java code. But during committing, getting the above error. What can be issue and how it can be resolved?

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 Sady_Rifat

The error indicates that you wanted to create a node where the type is nt:unstructured. But the parent node doesn't allow this.

To make sure you can examine the node type definition using CRXDE by manually creating the expected behavior.

2 replies

DPrakashRaj
Community Advisor
Community Advisor
June 15, 2023

It seems nt:unstructured is not a valid node type of parent node that you are trying to save.

 

Sady_Rifat
Community Advisor
Sady_RifatCommunity AdvisorAccepted solution
Community Advisor
June 15, 2023

The error indicates that you wanted to create a node where the type is nt:unstructured. But the parent node doesn't allow this.

To make sure you can examine the node type definition using CRXDE by manually creating the expected behavior.

Level 4
June 15, 2023

Is there a way we can change the node type definition? How to do so?

Sady_Rifat
Community Advisor
Community Advisor
June 15, 2023

From my limitation, I don't have the idea to change the node type definition. If possible you can try with different node type or change the parent node properties which will allow your child.