Hi!

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:

[code]
<propertyDefinition name="category0" requiredType="Long" autoCreated="false"
mandatory="false" onParentVersion="COPY" protected="false" multiple="true"
/>
[/code]

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

[stack]
javax.jcr.nodetype.ConstraintViolationException: no matching property
definition found for {}category0
    at
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef
(EffectiveNodeType.java:797)
    at org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(
NodeImpl.java:884)
    at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java
:433)
    at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java
:403)
    at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1891)
    at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:1875)
[/stack]

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

        if (collection == null) {
            return;
        }


        // 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
[/code]

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,

./alex
--
.w( the_mindstorm )p.

Reply via email to