Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 86821 invoked from network); 28 Mar 2007 08:08:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Mar 2007 08:08:16 -0000 Received: (qmail 26725 invoked by uid 500); 28 Mar 2007 08:08:22 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 26685 invoked by uid 500); 28 Mar 2007 08:08:21 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 26676 invoked by uid 99); 28 Mar 2007 08:08:21 -0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of harvey.waters@googlemail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 01:08:20 -0700 Received: by ug-out-1314.google.com with SMTP id p31so134907ugc for ; Wed, 28 Mar 2007 01:06:51 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=oSm6qO7bAGIhLm8eK2jAiTAyzLC2PqCw436wSGIj+wIXcEC65+Uf6DtVS0fP2MvggetjXmmQXCmpP2T0ZYTL4LeYHSMi+zBOvF8CRrTr5yvxKR8Ak34JBBHivPiimK0JfSDjcTgr8zEiAO1Dnl3eu5H+dCYivGm46bhH1AWkoHc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=gDanwkxCHJS3r1/MWJ2f4BKKIVHzG92E0vAJs/9ZGAIrQdVOypEMrqagKbxSwyKE11ff4u0ddNjaj4B0bL+jzc6fP1URWA8WyeaZV16YPZ8Mgki1yzHmDYFyA2GrqeJ46deJGvvnrPZQ9fNBy82rgffVtnvEP5AMICQbyENieDU= Received: by 10.78.18.3 with SMTP id 3mr4053184hur.1175069211435; Wed, 28 Mar 2007 01:06:51 -0700 (PDT) Received: by 10.78.193.14 with HTTP; Wed, 28 Mar 2007 01:06:51 -0700 (PDT) Message-ID: <235bf4ca0703280106m7376f293ya598c867f27853c8@mail.gmail.com> Date: Wed, 28 Mar 2007 09:06:51 +0100 From: "harvey waters" To: dev@jackrabbit.apache.org, tobias.bocanegra@day.com Subject: Re: Restore throws a ConstraintViolationException In-Reply-To: <8be731880703270533u3d6de2f4o2abb4f9ed3f62d43@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8907_221831.1175069211389" References: <9691232.post@talk.nabble.com> <8be731880703270533u3d6de2f4o2abb4f9ed3f62d43@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_8907_221831.1175069211389 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Tobias, I've been running and re-running the code to try and understand this and I'm sure this is a bug. setMixinTypesProperty does indeed alter the value of the mixin type property but it doesn't change the mixinTypeNames in the state variable (NodeState), this still has the original mixin names in it. When the session.save is fired (at the end of the restore) the effective node type uses '((NodeState) state).getMixinTypeNames()' this builds an effective node type that is now incorrect (as the restore has removed the mandatory properties). Thanks for the help. Harvey On 3/27/07, Tobias Bocanegra wrote: > > yes, there is: > > // adjust mixins > QName[] mixinNames = freeze.getFrozenMixinTypes(); > setMixinTypesProperty(new HashSet(Arrays.asList(mixinNames))); > > regards, toby > > On 3/27/07, HarveyWaters wrote: > > > > I can see in the restoreFrozen state function of NodeImpl that any > properties > > that are not in the node being restored are removed. There doesn't > however > > appear to be anything to remove mixinTypes that are no longer in the > > restored node. Consequently a constraint violation is thrown for any > mixin > > types within mandatory properties. Is this right or am I missing > something ? > > -- > > View this message in context: > http://www.nabble.com/Restore-throws-a-ConstraintViolationException-tf3472710.html#a9691232 > > Sent from the Jackrabbit - Dev mailing list archive at Nabble.com. > > > > > > > -- > -----------------------------------------< tobias.bocanegra@day.com >--- > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel > T +41 61 226 98 98, F +41 61 226 98 97 > -----------------------------------------------< http://www.day.com >--- > ------=_Part_8907_221831.1175069211389--