Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 56068 invoked from network); 4 Oct 2005 18:12:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Oct 2005 18:12:57 -0000 Received: (qmail 41069 invoked by uid 500); 4 Oct 2005 18:12:56 -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 41058 invoked by uid 99); 4 Oct 2005 18:12:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2005 11:12:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of edgarpoce@gmail.com designates 66.249.82.202 as permitted sender) Received: from [66.249.82.202] (HELO xproxy.gmail.com) (66.249.82.202) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2005 11:12:59 -0700 Received: by xproxy.gmail.com with SMTP id s13so386802wxc for ; Tue, 04 Oct 2005 11:12:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fzm1RUW93eNkQSpZGdC5Od+ZTDIi8iShczV/VZmlMOZ0kG/q+D+lQX4bDtEuKTXHPigRM30FDQ6yQid3DJCldmqunfEdzt7jrWLcI0UxtxAaer0Gen3v6S9P7R7/o2i5rhtmpX/kObSvc3mm63x8Do2MwlB2ucNC650UzB8Ow2o= Received: by 10.70.76.9 with SMTP id y9mr930967wxa; Tue, 04 Oct 2005 11:12:33 -0700 (PDT) Received: by 10.70.61.9 with HTTP; Tue, 4 Oct 2005 11:12:33 -0700 (PDT) Message-ID: <8a83c96b0510041112r5e093341l7fd074f3e9275376@mail.gmail.com> Date: Tue, 4 Oct 2005 15:12:33 -0300 From: Edgar Poce Reply-To: Edgar Poce To: jackrabbit-dev@incubator.apache.org Subject: Re: [jira] Resolved: (JCR-232) jcr:baseVersion is not updated when the base version is removed from the version history In-Reply-To: <517938701.1128333708516.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1234234877.1128262067825.JavaMail.jira@ajax.apache.org> <517938701.1128333708516.JavaMail.jira@ajax.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi tobias now the base version can not be removed, is it the expected behaviour?. Shouldn't the user be able to remove it and jackrabbit should repair the versionhistory and set the base version to the predecessor?. br, edgar On 10/3/05, Tobias Strasser (JIRA) wrote: > [ http://issues.apache.org/jira/browse/JCR-232?page=3Dall ] > > Tobias Strasser resolved JCR-232: > --------------------------------- > > Resolution: Fixed > > Author: tripod > Date: Mon Oct 3 02:55:40 2005 > New Revision: 293286 > > > > jcr:baseVersion is not updated when the base version is removed from th= e version history > > -----------------------------------------------------------------------= ----------------- > > > > Key: JCR-232 > > URL: http://issues.apache.org/jira/browse/JCR-232 > > Project: Jackrabbit > > Type: Bug > > Components: versioning > > Reporter: Edgar Poce > > Assignee: Tobias Strasser > > Fix For: 1.0 > > > > > Session s1 =3D repo.login(new SimpleCredentials("user1", "pwd1"= .toCharArray())); > > Node root1 =3D s1.getRootNode() ; > > Node test1 =3D root1.addNode("test") ; > > test1.addMixin("mix:versionable"); > > s1.save() ; > > System.out.println(test1.getProperty("jcr:baseVersion").getValu= e().getString()) ; > > test1.checkin() ; > > System.out.println(test1.getProperty("jcr:baseVersion").getValu= e().getString()) ; > > test1.getVersionHistory().removeVersion("1.0") ; > > // the base version wasn't updated :( > > System.out.println(test1.getProperty("jcr:baseVersion").getValu= e().getString()) ; > > // the next line throws ItemNotFoundException :( > > test1.getBaseVersion() ; > > javax.jcr.ItemNotFoundException: c33bf049-c7e1-4b34-968a-63ff1b1113b0 > > at org.apache.jackrabbit.core.ItemManager.createItemInstance(Item= Manager.java:498) > > at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.jav= a:349) > > at org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.j= ava:642) > > at org.apache.jackrabbit.core.NodeImpl.getBaseVersion(NodeImpl.ja= va:2960) > > at org.apache.jackrabbit.core.RemoveVersionTest.main(RemoveVersio= nTest.java:56) > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the administrators: > http://issues.apache.org/jira/secure/Administrators.jspa > - > For more information on JIRA, see: > http://www.atlassian.com/software/jira > >