Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 73062 invoked from network); 15 Nov 2005 13:41:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Nov 2005 13:41:02 -0000 Received: (qmail 51473 invoked by uid 500); 15 Nov 2005 13:41:01 -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 51461 invoked by uid 99); 15 Nov 2005 13:41:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 05:41:01 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 193.19.192.5 is neither permitted nor denied by domain of the.mindstorm.mailinglist@gmail.com) Received: from [193.19.192.5] (HELO mail.evolva.ro) (193.19.192.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 05:40:52 -0800 Received: (qmail 41869 invoked by uid 1013); 15 Nov 2005 13:40:35 -0000 Received: from 86.55.40.139 by evolva.ro (envelope-from , uid 89) with qmail-scanner-1.25 (clamdscan: 0.87.1/1167. Clear:RC:1(86.55.40.139):. Processed in 0.052751 secs); 15 Nov 2005 13:40:35 -0000 Received: from unknown (HELO ?192.168.62.51?) (alexandru.popescu@evolva.ro@86.55.40.139) by mail.evolva.ro with AES256-SHA encrypted SMTP; 15 Nov 2005 13:40:35 -0000 Message-ID: <4379E52C.5030503@gmail.com> Date: Tue, 15 Nov 2005 15:39:56 +0200 From: Alexandru Popescu User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: jackrabbit-dev@incubator.apache.org Subject: Re: Bug with multi-valued properties when exporting repository content? References: <8fa1023f0511121246u25263b4al17b44853782bcafe@mail.gmail.com> <90a8d1c00511140549u47019358v80f66fb5e98ffa77@mail.gmail.com> <8fa1023f0511141322n74e9fb76sd79e78032b20c5ff@mail.gmail.com> <90a8d1c00511150131q5a21582nfcd5f7dd6b1c34b9@mail.gmail.com> <8fa1023f0511150254n4db8c1e5k2bb25fd9c4bc71f@mail.gmail.com> <90a8d1c00511150336i1d8623acl546abb7c9f770c10@mail.gmail.com> <4379CADD.70205@gmail.com> <90a8d1c00511150504i8ed43b6jb236e8f8913eecc1@mail.gmail.com> In-Reply-To: <90a8d1c00511150504i8ed43b6jb236e8f8913eecc1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N #: Stefan Guggisberg changed the world a bit at a time by saying on 11/15/2005 3:04 PM :# > On 11/15/05, Alexandru Popescu wrote: >> #: Stefan Guggisberg changed the world a bit at a time by saying on 11/15/2005 1:36 PM :# >> > On 11/15/05, Martin Perez wrote: >> >> Ok Stefan. >> >> >> >> But I think that the problem happens also with more than one property, i.e. >> >> : >> >> >> >> Property p1 = node1.setProperty("someName", new String[] >> >> {"someValue1","someValue2"}); >> >> >> >> I don't know if your explanation covers this case. >> > >> > sorry, what problem occurs if you reimport the above property? >> > >> > i would expect that for the reimported property p1: >> > >> > p1.getDefinition().isMultiple()==true >> > >> > is this not the case? >> > >> >> It looks like it is not the case >> >> [quote] >> Here is >> the surprise: now that simple property has a values attribute composed by a >> Value[1] array (ok) but multivalued attribute is false !!! >> >> I tested this with a property with two values, and in this case all works >> correctly, so it seems that the problem is with multi-valued properties with >> only one Value in their values array. >> [/quote] > > thanks, i can read. let's martin answer the question. > sorry, no intention to hurt :-S. ./alex -- .w( the_mindstorm )p. >> >> ./alex >> -- >> .w( the_mindstorm )p. >> >> >> >> >> Regards. >> >> >> >> Martin >> >> >> >> On 11/15/05, Stefan Guggisberg wrote: >> >> > >> >> > On 11/14/05, Martin Perez wrote: >> >> > > Stefan, you were right, my message was a little unclear. >> >> > > >> >> > > With the "multivalued attribute is false" and "has a values attribute" >> >> > > phrases I meant that the PropertyImpl state object has those values in >> >> > those >> >> > > attributes. So, in this case the property is supposed to be not >> >> > multivalued >> >> > > but has multiple values. >> >> > > >> >> > > And, yes, I was using exportSystemView with skipBinary=false and >> >> > > noRecurse=false. >> >> > > >> >> > > If it is not clear I can try to explain better ( I must improve my >> >> > english >> >> > > ), but basically the problem is that an exported multivalued property is >> >> > > imported as a single-valued property, but the internal Value[] array >> >> > remains >> >> > > the same in both cases. >> >> > >> >> > no problem martin, i got it now :-) >> >> > >> >> > let's assume the following: >> >> > >> >> > Property p1 = node1.setProperty("someName", new String[] {"someValue"}); >> >> > Property p2 = node2.setProperty("someName", "someValue"); >> >> > >> >> > the problem is that in system view xml format both properties are >> >> > identical, i.e. the 'multiValued' information is not explicitly recorded: >> >> > >> >> > >> >> > someValue >> >> > >> >> > >> >> > if on reimport the parent node's node type contains both single- and >> >> > multivalued >> >> > definitions that would be applicable the former is taken. nt:unstructured >> >> > is an >> >> > example for a node type containing both single- and multivalued residual >> >> > property definitions. >> >> > >> >> > please note that this is not a bug in jackrabbit but a issue of the >> >> > system view xml format as specified in 6.4.1 System View XML Mapping >> >> > of jsr 170. >> >> > >> >> > cheers >> >> > stefan >> >> > >> >> > >> >> > > >> >> > > Regards, >> >> > > >> >> > > Martin >> >> > > >> >> > > On 11/14/05, Stefan Guggisberg wrote: >> >> > > > >> >> > > > hi martin, >> >> > > > >> >> > > > On 11/12/05, Martin Perez wrote: >> >> > > > > Hi. >> >> > > > > >> >> > > > > I finished my holidays and so I expect to spam again this list with >> >> > a >> >> > > > bunch >> >> > > > > of questions and possible bug reports :) >> >> > > > > >> >> > > > > First of all, I'm using a two weeks ago version of jackrabbit. So >> >> > > > forgive me >> >> > > > > if this bug has already been resolved. >> >> > > > > >> >> > > > > Now, the bug: I created a node with only one multi-valued property. >> >> > The >> >> > > > > property also only has a single value. But, even as the property has >> >> > one >> >> > > > > value, the property is multivalued and has a values attribute >> >> > composed >> >> > > > by a >> >> > > > > Value[1] array and its multivalued attribute is true. All is fine.. >> >> > > > > >> >> > > > > Now, I export that simple repository, and after this I import it. >> >> > Here >> >> > > > is >> >> > > > > the surprise: now that simple property has a values attribute >> >> > composed >> >> > > > by a >> >> > > > > Value[1] array (ok) but multivalued attribute is false !!! >> >> > > > >> >> > > > what do you mean with "multivalued attribute is false" and "has a >> >> > > > values attribute"? >> >> > > > >> >> > > > > >> >> > > > > I tested this with a property with two values, and in this case all >> >> > > > works >> >> > > > > correctly, so it seems that the problem is with multi-valued >> >> > properties >> >> > > > with >> >> > > > > only one Value in their values array. >> >> > > > > >> >> > > > > Do you think that this could be a bug ? or maybe I'm missing >> >> > > > something... >> >> > > > >> >> > > > what export format did you choose? document view or system view? >> >> > > > note that the document view export format is not guaranteed to be >> >> > fully >> >> > > > roundtrippable as some information is inevitably lost in order to make >> >> > > > the output more human readable. >> >> > > > >> >> > > > if you need to reimport the exported data you should use the system >> >> > view >> >> > > > format. >> >> > > > >> >> > > > 6.4.2 Document View XML Mapping (ff.) of the jsr 170 specification >> >> > > > provides >> >> > > > more detailed information on this topic. >> >> > > > >> >> > > > cheers >> >> > > > stefan >> >> > > > >> >> > > > >> >> > > > > >> >> > > > > Thanks, >> >> > > > > >> >> > > > > Martin >> >> > > > > >> >> > > > > >> >> > > > >> >> > > >> >> > > >> >> > >> >> >> >> >> > >> >> >