Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 22541 invoked from network); 29 Oct 2008 08:06:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Oct 2008 08:06:36 -0000 Received: (qmail 33436 invoked by uid 500); 29 Oct 2008 08:06:40 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 33417 invoked by uid 500); 29 Oct 2008 08:06:40 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 33406 invoked by uid 99); 29 Oct 2008 08:06:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2008 01:06:40 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [62.101.100.50] (HELO smtpout3.reply.it) (62.101.100.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2008 08:05:23 +0000 Received: from ced01hubs01.replynet.prv (10.50.63.3) by ced01ets01.replynet.prv (172.16.1.32) with Microsoft SMTP Server (TLS) id 8.1.291.1; Wed, 29 Oct 2008 09:06:00 +0100 Received: from CED01CMBXS01.replynet.prv ([10.50.61.2]) by ced01hubs01.replynet.prv ([10.50.63.2]) with mapi; Wed, 29 Oct 2008 09:06:01 +0100 From: Blanco Emanuele To: "users@jackrabbit.apache.org" Date: Wed, 29 Oct 2008 09:05:52 +0100 Subject: RE: properties declaration in CND Thread-Topic: properties declaration in CND Thread-Index: Ack5J3dFExCT7BVGQamLz4x0M8wrOwAdAskA Message-ID: <9889CC1A69BBC549931AF0B0C250EE651219B13DAE@CED01CMBXS01.replynet.prv> References: <9889CC1A69BBC549931AF0B0C250EE651219B13D91@CED01CMBXS01.replynet.prv> In-Reply-To: Accept-Language: it-IT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: it-IT, en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org I'm customizing an application. My CND is: [ns:tipologia] > 'nt:hierarchyNode','mix:referenceable' - ns:figli (reference) multiple - ns:padre (reference) And the code I'm using is: Node padreNode =3D RulesRepository.addNodeIfNew(tipologieRootNode, = "padre", "ns:tipologia"); Node figlioNode =3D RulesRepository.addNodeIfNew(tipologieRootNode,= "figlio", "ns:tipologia"); padreNode.setProperty("ns:figli", figlioNode); <---- got exception = here The exception is: javax.jcr.nodetype.ConstraintViolationException: no matching property defin= ition found for {http://www.mynamespace.org/1.0}figli RulesRepository.addNodeIfNew() is an utility method from the JBoss Drools B= RMS (which I'm going to customize), and it simply creates a Node. Thank you. -- Emanuele Blanco Open Reply s.r.l. C.so Francia 110, Torino C e-mail: e.blanco@reply.it -----Original Message----- From: Alexander Klimetschek [mailto:aklimets@day.com] Sent: marted=EC 28 ottobre 2008 18.53 To: users@jackrabbit.apache.org Subject: Re: properties declaration in CND On Tue, Oct 28, 2008 at 4:21 PM, Blanco Emanuele wrote: > But it doesn't work when I try to set the ns:property1 via the APIs (got = a property doesn't exist exception or something similar). > > Am I missing something in the CND or there's something wrong with my code= ? I think it would be helpful if you could post your CND, the code and the actual exception you get. Since you use reference properties, did you set a target node with node.setProperty(String, Node)? Regards, Alex -- Alexander Klimetschek alexander.klimetschek@day.com -- The information transmitted is intended for the person or entity to which i= t is addressed and may contain confidential and/or privileged material. Any= review, retransmission, dissemination or other use of, or taking of any ac= tion in reliance upon, this information by persons or entities other than t= he intended recipient is prohibited. If you received this in error, please = contact the sender and delete the material from any computer.