I was trying to create a child node for a given node, either with JcrUtil or Node's addNode api directly. The parent node type is nt:file, and the child node type I want to add is nt:unstructured. But I always get ConstraintViolationException, saying that:
"No child node definition for childNode found in node /parent"
You cannot add a child node to a nt:file node. Use a different nodetype for the parent (like nt:folder or nt:unstructured, or many others more ...)
As Jörg mentioned it is integrity constraint--a rule that restricts adding nt:unstructured into nt:file. You can verify all the definitions of nodetype at .