jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject Difference between older Jackrabbits and 1.4/1.4.1?
Date Fri, 22 Feb 2008 19:57:06 GMT
I have this code i use for running fitnesse tests. It ran without incident 
in past versions of JRabbit. I now upgraded to 1.4 and core 1.4.1 and now it 
fails on the parent.save() method with

javax.jcr.ItemNotFoundException: 3f883da8-04fa-4d5d-a0a7-d98d201b10a5

Did anything change going to 1.4? In my case there are child nodes below the 
nodes i am removing, is this a problem now? Do i have to remove all children 
recursively, bottom - up?


/** This method is only to be used by testing frameworks */
public synchronized void destroy() throws ContentRepositoryException
{
    if (!m_isEmbedded)
    throw new ContentRepositoryException("Not allowed to destroy a non 
embedded content repository");
    try
    {
        Node projectsRoot = getProjectsRootNode();
        if (projectsRoot != null)
        {
            Node parent = projectsRoot.getParent();
            projectsRoot.remove();
            parent.save();
        }
        m_projectRootUuid = null;
        Node usersRoot = getUsersRootNode();
        if (usersRoot != null)
        {
            Node parent = usersRoot.getParent();
            usersRoot.remove();
            parent.save();
        }
        m_userRootUuid = null;
        m_session.save();
    }
    catch (RepositoryException re)
    {
        throw new ContentRepositoryException("Failed destroying embedded 
repository", re);
    }
} 


Mime
View raw message