Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 21834 invoked from network); 5 Aug 2010 23:00:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Aug 2010 23:00:38 -0000 Received: (qmail 91114 invoked by uid 500); 5 Aug 2010 23:00:38 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 90951 invoked by uid 500); 5 Aug 2010 23:00:37 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 90934 invoked by uid 99); 5 Aug 2010 23:00:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Aug 2010 23:00:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Aug 2010 23:00:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o75N0Gh4011620 for ; Thu, 5 Aug 2010 23:00:16 GMT Message-ID: <6316891.190211281049216171.JavaMail.jira@thor> Date: Thu, 5 Aug 2010 19:00:16 -0400 (EDT) From: "Cory Prowse (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Created: (JCR-2701) createWorkspace throws PathNotFoundException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 createWorkspace throws PathNotFoundException -------------------------------------------- Key: JCR-2701 URL: https://issues.apache.org/jira/browse/JCR-2701 Project: Jackrabbit Content Repository Issue Type: Bug Components: jackrabbit-core Affects Versions: 2.1.0 Environment: Jackrabbit is deployed using released JCA on Glassfish 3.0.1 Reporter: Cory Prowse The following code throws a PathNotFoundException: --- package au.jcr; import javax.annotation.PostConstruct; import javax.annotation.Resource; import javax.ejb.Singleton; import javax.ejb.Startup; import javax.jcr.Repository; import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.SimpleCredentials; @Startup @Singleton public class JcrStartupSingleton { @Resource(name = "jcr/repository", type = javax.jcr.Repository.class) private Repository repository; @PostConstruct public void setupWorkspaces() throws RepositoryException { final Session session = repository.login(new SimpleCredentials("admin", "".toCharArray()), "production"); try { session.getRootNode().addNode("example"); session.save(); // Exception is thrown here (is line 27) session.getWorkspace().createWorkspace("staging", "production"); } finally { session.logout(); } } } --- javax.ejb.EJBException: javax.ejb.CreateException: Initialization failed for Singleton JcrStartupSingleton at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:698) ... Caused by: javax.ejb.CreateException: Initialization failed for Singleton JcrStartupSingleton at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:528) ... Caused by: javax.jcr.PathNotFoundException: /example at org.apache.jackrabbit.core.BatchedItemOperations.getNodeState(BatchedItemOperations.java:1456) at org.apache.jackrabbit.core.BatchedItemOperations.copy(BatchedItemOperations.java:387) at org.apache.jackrabbit.core.WorkspaceImpl.internalCopy(WorkspaceImpl.java:404) at org.apache.jackrabbit.core.WorkspaceImpl.clone(WorkspaceImpl.java:606) at org.apache.jackrabbit.core.WorkspaceImpl.createWorkspace(WorkspaceImpl.java:221) at au.jcr.JcrStartupSingleton.setupWorkspaces(JcrStartupSingleton.java:27) ... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.