You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Edgar Poce (JIRA)" <ji...@apache.org> on 2005/10/02 16:07:47 UTC
[jira] Created: (JCR-232) jcr:baseVersion is not updated when the base version is removed from the version history
jcr:baseVersion is not updated when the base version is removed from the version history
----------------------------------------------------------------------------------------
Key: JCR-232
URL: http://issues.apache.org/jira/browse/JCR-232
Project: Jackrabbit
Type: Bug
Components: versioning
Reporter: Edgar Poce
Fix For: 1.0
Session s1 = repo.login(new SimpleCredentials("user1", "pwd1".toCharArray()));
Node root1 = s1.getRootNode() ;
Node test1 = root1.addNode("test") ;
test1.addMixin("mix:versionable");
s1.save() ;
System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
test1.checkin() ;
System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
test1.getVersionHistory().removeVersion("1.0") ;
// the base version wasn't updated :(
System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
// the next line throws ItemNotFoundException :(
test1.getBaseVersion() ;
javax.jcr.ItemNotFoundException: c33bf049-c7e1-4b34-968a-63ff1b1113b0
at org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:498)
at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:349)
at org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.java:642)
at org.apache.jackrabbit.core.NodeImpl.getBaseVersion(NodeImpl.java:2960)
at org.apache.jackrabbit.core.RemoveVersionTest.main(RemoveVersionTest.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
Re: [jira] Resolved: (JCR-232) jcr:baseVersion is not updated when the base version is removed from the version history
Posted by Tobias Bocanegra <to...@day.com>.
hi edgar,
according to the spec, the repository must repair the version history
if a version is removed. this action is performed when a version is
actually removed.
due to the normal 'referenced by' constraint, a node cannot be
removed, if it is referenced by another one. this also applies to a
version node. it is also highly application dependant, what should be
done automatically when a 'used' version is to be removed. imo, this
should not be the repositories responsability.
regards, tobi
On 10/4/05, Edgar Poce <ed...@gmail.com> wrote:
> 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) <ji...@apache.org> wrote:
> > [ http://issues.apache.org/jira/browse/JCR-232?page=all ]
> >
> > 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 the 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 = repo.login(new SimpleCredentials("user1", "pwd1".toCharArray()));
> > > Node root1 = s1.getRootNode() ;
> > > Node test1 = root1.addNode("test") ;
> > > test1.addMixin("mix:versionable");
> > > s1.save() ;
> > > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> > > test1.checkin() ;
> > > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> > > test1.getVersionHistory().removeVersion("1.0") ;
> > > // the base version wasn't updated :(
> > > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> > > // the next line throws ItemNotFoundException :(
> > > test1.getBaseVersion() ;
> > > javax.jcr.ItemNotFoundException: c33bf049-c7e1-4b34-968a-63ff1b1113b0
> > > at org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:498)
> > > at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:349)
> > > at org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.java:642)
> > > at org.apache.jackrabbit.core.NodeImpl.getBaseVersion(NodeImpl.java:2960)
> > > at org.apache.jackrabbit.core.RemoveVersionTest.main(RemoveVersionTest.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
> >
-----------------------------------------< 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 >---
Re: [jira] Resolved: (JCR-232) jcr:baseVersion is not updated when the base version is removed from the version history
Posted by Edgar Poce <ed...@gmail.com>.
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) <ji...@apache.org> wrote:
> [ http://issues.apache.org/jira/browse/JCR-232?page=all ]
>
> 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 the 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 = repo.login(new SimpleCredentials("user1", "pwd1".toCharArray()));
> > Node root1 = s1.getRootNode() ;
> > Node test1 = root1.addNode("test") ;
> > test1.addMixin("mix:versionable");
> > s1.save() ;
> > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> > test1.checkin() ;
> > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> > test1.getVersionHistory().removeVersion("1.0") ;
> > // the base version wasn't updated :(
> > System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> > // the next line throws ItemNotFoundException :(
> > test1.getBaseVersion() ;
> > javax.jcr.ItemNotFoundException: c33bf049-c7e1-4b34-968a-63ff1b1113b0
> > at org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:498)
> > at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:349)
> > at org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.java:642)
> > at org.apache.jackrabbit.core.NodeImpl.getBaseVersion(NodeImpl.java:2960)
> > at org.apache.jackrabbit.core.RemoveVersionTest.main(RemoveVersionTest.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
>
>
[jira] Resolved: (JCR-232) jcr:baseVersion is not updated when the base version is removed from the version history
Posted by "Tobias Strasser (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-232?page=all ]
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 the 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 = repo.login(new SimpleCredentials("user1", "pwd1".toCharArray()));
> Node root1 = s1.getRootNode() ;
> Node test1 = root1.addNode("test") ;
> test1.addMixin("mix:versionable");
> s1.save() ;
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> test1.checkin() ;
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> test1.getVersionHistory().removeVersion("1.0") ;
> // the base version wasn't updated :(
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> // the next line throws ItemNotFoundException :(
> test1.getBaseVersion() ;
> javax.jcr.ItemNotFoundException: c33bf049-c7e1-4b34-968a-63ff1b1113b0
> at org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:498)
> at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:349)
> at org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.java:642)
> at org.apache.jackrabbit.core.NodeImpl.getBaseVersion(NodeImpl.java:2960)
> at org.apache.jackrabbit.core.RemoveVersionTest.main(RemoveVersionTest.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
[jira] Assigned: (JCR-232) jcr:baseVersion is not updated when the base version is removed from the version history
Posted by "Tobias Strasser (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JCR-232?page=all ]
Tobias Strasser reassigned JCR-232:
-----------------------------------
Assign To: Tobias Strasser
> jcr:baseVersion is not updated when the base version is removed from the 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 = repo.login(new SimpleCredentials("user1", "pwd1".toCharArray()));
> Node root1 = s1.getRootNode() ;
> Node test1 = root1.addNode("test") ;
> test1.addMixin("mix:versionable");
> s1.save() ;
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> test1.checkin() ;
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> test1.getVersionHistory().removeVersion("1.0") ;
> // the base version wasn't updated :(
> System.out.println(test1.getProperty("jcr:baseVersion").getValue().getString()) ;
> // the next line throws ItemNotFoundException :(
> test1.getBaseVersion() ;
> javax.jcr.ItemNotFoundException: c33bf049-c7e1-4b34-968a-63ff1b1113b0
> at org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:498)
> at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:349)
> at org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.java:642)
> at org.apache.jackrabbit.core.NodeImpl.getBaseVersion(NodeImpl.java:2960)
> at org.apache.jackrabbit.core.RemoveVersionTest.main(RemoveVersionTest.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