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 
$PathImpl.getAncestor(PathFactoryImpl.java:452)
	at org.apache.jackrabbit.core.BatchedItemOperations.copy 
(BatchedItemOperations.java:388)
	at org.apache.jackrabbit.core.WorkspaceImpl.internalCopy 
(WorkspaceImpl.java:444)
	at org.apache.jackrabbit.core.WorkspaceImpl.clone(WorkspaceImpl.java: 
646)
	at org.apache.jackrabbit.core.WorkspaceImpl.createWorkspace 
(WorkspaceImpl.java:252)
	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?

Thanks
Rakesh

Mime
View raw message