Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 29012 invoked from network); 15 Mar 2006 10:29:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Mar 2006 10:29:53 -0000 Received: (qmail 20682 invoked by uid 500); 15 Mar 2006 10:29:51 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 20671 invoked by uid 99); 15 Mar 2006 10:29:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 02:29:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of the.mindstorm.mailinglist@gmail.com designates 64.233.182.200 as permitted sender) Received: from [64.233.182.200] (HELO nproxy.gmail.com) (64.233.182.200) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2006 02:29:50 -0800 Received: by nproxy.gmail.com with SMTP id k27so52902nfc for ; Wed, 15 Mar 2006 02:29:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=RkJM0RpvxOfWDiKR6mFRjgJo1gBmCLaUYq/XrFBnRTynOVO1hRtpDbIKnYu457/dKdaswzPM1orKA0KBf2GojAupbtmafAjdR/ZqyB/IBBCigr4hCp3IvJbuPf0YQYEp+L+tJ0VFtCmItWZc1Uw9oVtClyrTJkoDtE4X72O6pQA= Received: by 10.49.56.2 with SMTP id i2mr154142nfk; Wed, 15 Mar 2006 02:29:29 -0800 (PST) Received: by 10.49.66.11 with HTTP; Wed, 15 Mar 2006 02:29:29 -0800 (PST) Message-ID: Date: Wed, 15 Mar 2006 12:29:29 +0200 From: "Alexandru Popescu" To: devJackrabbit Subject: mixin property and ConstraintViolationException MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_242_21879648.1142418569173" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_242_21879648.1142418569173 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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] [/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.getApplicableProperty= Def (EffectiveNodeType.java:797) at org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition( NodeImpl.java:884) at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.jav= a :433) at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.jav= a :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 =3D=3D null) { return; } // Add all collection element into an Value array Value[] values =3D new Value[collection.getSize()]; // initialize the values parentNode.setProperty(jcrName, values); /// <=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D 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. ------=_Part_242_21879648.1142418569173--