jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Röthenbacher <felix.roethenbac...@wyona.com>
Subject Re: PathNotFoundException when copying between workspaces
Date Mon, 11 Apr 2005 14:35:07 GMT
Hi Stefan

i tracked it down to the HierarchyManagerImpl class. There,
resolvePath() [199] is called for the source path (e.g. '/site/test',
where 'test' is a newly added or copied node).

The execution path is as follows:

[199] resolvePath(Path path)
[222] for (...)
         [iterate over all path elements]
[226]   parentState.hasChildNodeEntry(...) => false for name='test'
[241]   parentState.hasProperty(...) => false for name='test'
[253]   PathNotFoundException

Actually, the NodeState.ChildNodeEntries of 'site's parentState
does not reflect the newly added node.

Unfortunately, I can't reproduce it with a simple setup for
now ...

As said before, after a restart of the repository after adding
the node, it can be copied without a problem (with same code



Stefan Guggisberg wrote:
> i tested what you're describing with the following code fragment:
>     Session sA = r.login(new SimpleCredentials("johndoe",
> "".toCharArray()), "A");
>     Session sB = r.login(new SimpleCredentials("johndoe",
> "".toCharArray()), "B");
>     Node nA = sA.getRootNode().addNode("foo");
>     sA.save();
>     Workspace wB = sB.getWorkspace();
>     wB.copy("A", nA.getPath(), "/bar");
> everything worked as expected.
> are you sure you're logging in on the same Repository instance?
> cheers
> stefan
> On Apr 8, 2005 9:51 PM, Felix Röthenbacher
> <felix.roethenbacher@wyona.com> wrote:
>>as mentioned before, I get a PathNotfoundException
>>when I try to copy a node from one workspace to
>>another. Here is the programme excecution:
>>1. Open session sA with workspace wA
>>2. Create a new node nA in workspace wA
>>3. Call sA.save() (afterwards it reports no pending changes)
>>4. Open session sB with workspace wB
>>5. Call wB.copy(wA, nA, [dstPath])
>>6. A PathNotFoundException is thrown
>>Funny thing is, that when I restart the repository
>>instance after node creation, this procedure works.
>>Thanks for sheding light on this
>>- Felix

View raw message