jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Karlstrøm <karlst...@corporater.com>
Subject Bug report
Date Mon, 26 Feb 2007 09:50:40 GMT
Hello. I am trying to file a bug report, but the JIRA system is a bit 
slow (as in:not responding), so I'll report the bug here. Will also file 
to bug in JIRA. In my opinion, this bug is at Critical level in JIRA, as 
loss of data can occur.

I do not know what causes the bug (perhaps the 
CachingHierarchyManager?), it was not present in Jackrabbit 1.0.1, but 
was introduced in 1.1.

Have also tested the latest release: 1.2.2, and the bug is still present 
there.

Reproducible JUnit testcase follows:


====================
package com.bug.app;
import javax.jcr.Node;
import javax.jcr.Repository;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;

import junit.framework.TestCase;

import org.apache.jackrabbit.core.TransientRepository;


public class JackrabbitBugTest extends TestCase {
   public void testDelete() throws Exception{
           Repository repository = new TransientRepository();
           Session session = repository.login(new 
SimpleCredentials("username", "password".toCharArray()));
                     Node root = session.getRootNode();
           Node aNode = root.addNode("a");
           Node a1node = aNode.addNode("a");
           Node a2node = root.addNode("a");
                                 session.save();
           // This test fails only if the line below is present  
           System.out.println("new path:"+a2node.getPath());
                     a1node.remove();
           session.save();
           aNode.remove();
           session.save();
           //a2node = (Node) session.getItem("/myroot/a"); // this also 
fails
           a2node.remove();
           session.save();          }
}

====================

-- 
Best regards, Frank Karlstrøm
Senior Developer, Corporater AS
LinkedIn:  http://www.linkedin.com/pub/2/386/139
MSN:       frank_karlstrom@hotmail.com
Phone:     +47 4000 2214

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