jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu" <the.mindstorm.mailingl...@gmail.com>
Subject mixin property and ConstraintViolationException
Date Wed, 15 Mar 2006 10:29:29 GMT

I have an exception in my application that unfortunatelly I cannot
understand. The node on which I work has a mixin: cmed:classifiable, that
declares the following property:

<propertyDefinition name="category0" requiredType="Long" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false" multiple="true"

and here is the code that results in the following exception:

javax.jcr.nodetype.ConstraintViolationException: no matching property
definition found for {}category0
    at org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(
    at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java
    at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java
    at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1891)
    at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1875)

       if (parentNode.hasProperty(jcrName)) {
            parentNode.setProperty(jcrName, (Value[]) null);

        if (collection == null) {

        // Add all collection element into an Value array
        Value[] values = new Value[collection.getSize()];
        // initialize the values
        parentNode.setProperty(jcrName, values); /// <============== here is
the exception

I am wondering what exactly I am doing wrong. Any comments, ideas, hints on
why this is happening would help me pass over this critical problem. I am
using the jackrabit rc1 version.

many thanks in advance,

.w( the_mindstorm )p.

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