jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Müller <thomas.muel...@day.com>
Subject Re: Moving multiple objects in a transaction results in invalid path
Date Mon, 26 Jan 2009 07:25:34 GMT
Hi,

I can't reproduce this problem. My test case is:

import java.io.File;

import javax.jcr.Node;
import javax.jcr.Repository;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;

import org.apache.jackrabbit.core.TransientRepository;

public class TestMultiMove {

    public static void main(String[] args) throws Exception {
        deleteDirectory(new File("repository"));
        Repository rep = new TransientRepository();
        Session session = rep.login(new SimpleCredentials("", new char[0]));
        Node root = session.getRootNode();
        Node a = root.addNode("a");
        Node b = a.addNode("b");
        Node c = a.addNode("c");
        Node d = root.addNode("d");
        session.save();
        session.move("/a/b", "/d/b");
        session.move("/a/c", "/d/c");
        session.save();
        System.out.println("a: " + a.getPath());
        System.out.println("b: " + b.getPath());
        System.out.println("c: " + c.getPath());
        System.out.println("d: " + d.getPath());
        session.logout();
    }

    static void deleteDirectory(File file) {
        if (file.isDirectory()) {
            File[] list = file.listFiles();
            for (int i = 0; i < list.length; i++) {
                deleteDirectory(list[i]);
            }
        }
        file.delete();
    }
}

Regards,
Thomas


On Fri, Jan 23, 2009 at 6:02 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
>
> On Fri, Jan 23, 2009 at 5:59 PM, Pankaj Gupta <pg@fluent.com> wrote:
>> Is this issue reproducible? If so, should I file a new JIRA or open JCR-993
>> again if you think its related to that?
>
> Can you check whether the problem still occurs in Jackrabbit 1.5.2?
>
> If yes, please file a new bug in Jira. It's better not to reopen bugs
> that have already been marked as closed for a past release.
>
> BR,
>
> Jukka Zitting
>

Mime
View raw message