session.move() fails with mix:versionable nodes
-----------------------------------------------

                 Key: JCR-2572
                 URL: https://issues.apache.org/jira/browse/JCR-2572
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: JCR API, versioning
    Affects Versions: 2.0.0
            Reporter: chad davis


Jackrabbit 2.0.0
spi/davex stack

I'm using the session.move() to move a node.  In short, it works but when I add 
the mix:versionable mixin to my node types, it fails.  

Here's what I'm doing:

***WITHOUT VERSIONABLE NODES***

Assuming the following node structure:

/a/b0

I'm moving node /a/b0 to /a/b1 with the following API:

session.move( "/a/b0, "/a/b1" );
session.save();

As long as my node types don't have mix:versionable, this works.  Even when I 
move the node many times.

***WITH VERSIONABLE NODES****

Assuming again:

/a/b0

I'm moving node /a/b0 to /a/b1 with the following API:

session.move( "/a/b0, "/a/b1" );
session.save();

This works the FIRST TIME.  But if I do the following without restarting the 
application . . . 

Note: now the repo has:

/a/b1

Moving node /a/b1 to /a/b2 with the same API:

session.move( "/a/b1, "/a/b2" );
session.save();

Throws "javax.jcr.PathNotFoundException: /a/b0"

See how the path not found is pointing at the old path that DOES NOT EVEN EXIST 
anymore.  This does smell of being connected to versioning, does it not?


Here's my full stack trace ( with a bunch my own application's method 
invocations removed ):

<I>Original exception:

javax.jcr.PathNotFoundException: /BIP/1/1/doc0

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:501)

        at 
org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:67)

        at 
org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:49)

        at 
org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.start(RepositoryServiceImpl.java:457)

        at 
org.apache.jackrabbit.spi2davex.RepositoryServiceImpl$BatchImpl.access$200(RepositoryServiceImpl.java:399)

        at 
org.apache.jackrabbit.spi2davex.RepositoryServiceImpl.submit(RepositoryServiceImpl.java:304)

        at 
org.apache.jackrabbit.jcr2spi.WorkspaceManager$OperationVisitorImpl.execute(WorkspaceManager.java:830)

        at 
org.apache.jackrabbit.jcr2spi.WorkspaceManager$OperationVisitorImpl.access$500(WorkspaceManager.java:797)

        at 
org.apache.jackrabbit.jcr2spi.WorkspaceManager.execute(WorkspaceManager.java:594)

        at 
org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.save(SessionItemStateManager.java:139)

        at org.apache.jackrabbit.jcr2spi.ItemImpl.save(ItemImpl.java:246)

        at org.apache.jackrabbit.jcr2spi.SessionImpl.save(SessionImpl.java:328)

        at 
wego.ecms.WGContentRepositoryHelper.moveDocumentToNewName(WGContentRepositoryHelper.java:391)

        






-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to