jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anirban Majumdar" <anirban.majum...@altair.com>
Subject Problem with Mandatory Properties for Child Nodes
Date Thu, 21 Jan 2010 05:22:32 GMT
Hello everyone,


I've come across somewhat similar posts in the archive, but they all
primarily seemed to be dealing with nt:resource.

The problem I'm facing is that when I have a mandatory property
specified in a child node, then JackRabbit throws a
ConstraintViolationException [mandatory property does not exist]
whenever I try to save the contents of the parent node.

To put it programmatically,


I have a parent node:

[av:someParent] > nt:base

+ av:children [av:childNodeType]

= av:childNodeType



[av:childNodeType] > nt:unstructured

- av:name


- av:value



I have a bean class for someParent node, which contains a List of
childNode instances. In each of the instances I explicitly save the
"name" property. Then using OCM when I persist the parent node instance
- ocm.insert(parentNodeObj) - even this goes through fine. At the line
where I save the transient state of the repository - ocm.save() - I get
the ConstraintViolationException.


Any assistance will be truly appreciated.





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message