jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: NoSuchItemStateException thrown when trying checkin()
Date Sun, 03 Feb 2008 01:12:51 GMT
hi,
i just run your test on a plain jackrabbit 1.4 and it works without any errors.
regards, toby

On 2/2/08, zevon <sateeshl@expedia.com> wrote:
>
>
> Tobias Bocanegra wrote:
> >
> > hi,
> > what version of jackrabbit are you using?
> > regards, toby
> >
> >
> > Sateesh wrote:
> >>
> >> 1.4
> >>
> >
> > On 1/31/08, zevon <sateeshl@expedia.com> wrote:
> >>
> >> Below is a snippet of code I am using to play with versioning, but I am
> >> stuck
> >> as I see a exception on n.checkin() line. Any ideas why?
> >>
> >> Thanks.
> >>
> >> <snip>
> >> Repository repository = new TransientRepository();
> >>                 Session session = repository.login(new
> >> SimpleCredentials("username",
> >>                                 "password".toCharArray()));
> >>                 try {
> >>                         Node parentNode = session.getRootNode();
> >>
> >>           //create versionable node
> >>           Node n = parentNode.addNode("childNode", "nt:unstructured");
> >>           n.addMixin("mix:versionable");
> >>           n.setProperty("anyProperty", "Blah");
> >>           session.save();
> >>           Version firstVersion = n.checkin();
> >> </snip>
> >>
> >> Exception in thread "main" javax.jcr.RepositoryException: /childNode:
> >> unable
> >> to update item.: f1bb69e2-37de-448d-8a56-a3725a594432:
> >> f1bb69e2-37de-448d-8a56-a3725a594432
> >>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1252)
> >>         at
> >> org.apache.jackrabbit.core.NodeImpl.checkin(NodeImpl.java:2966)
> >>         at SecondHop.versioningBasics(SecondHop.java:253)
> >>         at SecondHop.main(SecondHop.java:59)
> >> Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException:
> >> f1bb69e2-37de-448d-8a56-a3725a594432
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager.getNodeReferences(SharedItemStateManager.java:329)
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager.updateReferences(SharedItemStateManager.java:1272)
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:550)
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:827)
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:857)
> >>         at
> >> org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:324)
> >>         at
> >> org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
> >>         at
> >> org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:300)
> >>         at
> >> org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:306)
> >>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1244)
> >>         ... 3 more
> >> org.apache.jackrabbit.core.state.NoSuchItemStateException:
> >> f1bb69e2-37de-448d-8a56-a3725a594432
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager.getNodeReferences(SharedItemStateManager.java:329)
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager.updateReferences(SharedItemStateManager.java:1272)
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:550)
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:827)
> >>         at
> >> org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:857)
> >>         at
> >> org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:324)
> >>         at
> >> org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
> >>         at
> >> org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:300)
> >>         at
> >> org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:306)
> >>         at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1244)
> >>         at
> >> org.apache.jackrabbit.core.NodeImpl.checkin(NodeImpl.java:2966)
> >>         at SecondHop.versioningBasics(SecondHop.java:253)
> >>         at SecondHop.main(SecondHop.java:59)
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/NoSuchItemStateException-thrown-when-trying-checkin%28%29-tp15212457p15212457.html
> >> 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 >---
> >
> >
>
> --
> View this message in context: http://www.nabble.com/NoSuchItemStateException-thrown-when-trying-checkin%28%29-tp15212457p15238276.html
> 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 >---

Mime
View raw message