jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Vidyadharan <rak...@sptci.com>
Subject Error when creating workspace
Date Fri, 06 Nov 2009 13:56:11 GMT
I have seen this issue before related to cloning a workspace through  
the clone method, and wondered if the same issues exist for the create  
method as well (JR 1.6).

   public void create( final String site ) throws RepositoryException
     final Session session = getSessionManager().getSession 
( Applications.Admin );
     ( (WorkspaceImpl) session.getWorkspace() ).createWorkspace(
         site, session.getWorkspace().getName() );

I am trying to create a new workspace that clones everything in the  
default workspace.  This method leads to the following exception:

Testcase: com.sptci.cms.util.CreateSiteTest took 0 sec
	Caused an ERROR
no ancestor at degree 1: {}
javax.jcr.PathNotFoundException: no ancestor at degree 1: {}
	at org.apache.jackrabbit.spi.commons.name.PathFactoryImpl 
	at org.apache.jackrabbit.core.BatchedItemOperations.copy 
	at org.apache.jackrabbit.core.WorkspaceImpl.internalCopy 
	at org.apache.jackrabbit.core.WorkspaceImpl.clone(WorkspaceImpl.java: 
	at org.apache.jackrabbit.core.WorkspaceImpl.createWorkspace 
	at com.sptci.cms.util.CreateSite.create(CreateSite.java:50)
	at com.sptci.cms.util.CreateSiteTest.init(CreateSiteTest.java:43)

Is this something I have to wait for JR 2.0 to be able to user?


View raw message