jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Node.addNode(relPath, nodeType) and javax.jcr.nodetype.ConstraintViolationException
Date Wed, 06 Sep 2006 08:29:50 GMT
hi dan

On 9/5/06, dan <danz8086@hotmail.com> wrote:
> Hi all,
>
> Hope this will be a quick question:
>
> I have the following CND file:
> [myCM:document]
> +* (myCM:field)   copy
> [myCM::docReferenceField] > myCM:field
> +* (myCM:documentReference) = myCM:documentReference
>   multiple copy
> [myCM:documentReference] >.....
> ...
>
> When I call the addNode method of Node D (myCM:document) as below:
> D.addNode("new document", "myCM:docReferenceField");
>
> JackRabbit throws  javax.jcr.nodetype.ConstraintViolationException. This is
> not correct, is it?

i am pretty confident that the exception is correct and that there's something
wrong with your node type defintions or your application code,
but i might be wrong... ;)

if you're positive that it is none of the above, please post a jira issue and
include your node type definitions and a simple test case.

cheers
stefan

>
> (According to the specification on child node definition:
> "... but rather that its primary node type (whatever else it may be) must be
> at least a subtype of both node types X and Y. Of course, inheritance is
> also respected in the simpler case where this attribute specifies only one
> primary node type. If it specifies, for example, type T, this means that the
> child node must be of type T or a subtype of type T...")
>
> Thanks,
> Dan
>
>

Mime
View raw message