jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shane Preater" <shane.prea...@googlemail.com>
Subject Problems cloning workspace
Date Mon, 11 Dec 2006 15:34:06 GMT
Hi I am using jackrabbit and require the ability to clone nodes and their
children from a development workspace to a live workspace.

I am having the following problem when trying to clone a simple node with a
single child using the 1.1.1 released version of Jackrabbit:

javax.jcr.ItemNotFoundException: failed to build path of
a2988d4b-429e-4c82-9f4e-5c0f4f799f9f: cafebabe-cafe-babe-cafe-babecafebabe
has no child entry for a2988d4b-429e-4c82-9f4e-5c0f4f799f9f
    at org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(
HierarchyManagerImpl.java:309)
    at org.apache.jackrabbit.core.CachingHierarchyManager.buildPath(
CachingHierarchyManager.java:160)
    at org.apache.jackrabbit.core.HierarchyManagerImpl.getPath(
HierarchyManagerImpl.java:358)
    at org.apache.jackrabbit.core.CachingHierarchyManager.getPath(
CachingHierarchyManager.java:222)
    at org.apache.jackrabbit.core.CachingHierarchyManager.nodeAdded(
CachingHierarchyManager.java:351)
    at
org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyNodeAdded(
StateChangeDispatcher.java:152)
    at org.apache.jackrabbit.core.state.SessionItemStateManager.nodeAdded(
SessionItemStateManager.java:829)
    at
org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyNodeAdded(
StateChangeDispatcher.java:152)
    at org.apache.jackrabbit.core.state.LocalItemStateManager.nodeAdded(
LocalItemStateManager.java:479)
    at org.apache.jackrabbit.core.state.NodeState.notifyNodeAdded(
NodeState.java:788)
    at org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry(
NodeState.java:377)
    at org.apache.jackrabbit.core.BatchedItemOperations.copyNodeState(
BatchedItemOperations.java:1674)
    at org.apache.jackrabbit.core.BatchedItemOperations.copy(
BatchedItemOperations.java:311)
    at org.apache.jackrabbit.core.WorkspaceImpl.internalCopy(
WorkspaceImpl.java:298)
    at org.apache.jackrabbit.core.WorkspaceImpl.clone(WorkspaceImpl.java
:405)
    at org.apache.jackrabbit.rmi.server.ServerWorkspace.clone(
ServerWorkspace.java:102)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Source)
    at java.lang.Thread.run(Unknown Source)

I have simply created two workspaces one called 'clonetest' and the other
'clonedestination'
I then created a node called 'test-node' and then cloned this successfully
from clonetest to clonedestination.
I then created a node in clonetest which is a child of 'test-node' called
'child'.

When trying to then clone test-node from clonetest to clonedestination again
I am getting the above exception.

public void testWorkspaceClone() throws Exception {
        try {
            ClientRepositoryFactory factory = new ClientRepositoryFactory();
            Repository repository = factory.getRepository
(LOCALHOST_REPOSITORY);
            Session shanoSession = repository.login(new SimpleCredentials(
                    "shane", "preater".toCharArray()), "clonedestination");

            String path = "/test-node";
            shanoSession.getWorkspace().clone("clonetest", path, path,
true);



            shanoSession.save();
            shanoSession.logout();
        } catch (Exception e) {
            e.printStackTrace();
            throw e;
        }
    }

I have seen that an error very similar to this was raised as JCR-452 and
this was fixed for 1.1. Does this mean I am doing something wrong or, should
I re-open the JIRA issue?

Kind regards,
Shane.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message