Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 79992 invoked from network); 23 Feb 2007 14:42:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2007 14:42:28 -0000 Received: (qmail 78916 invoked by uid 500); 23 Feb 2007 14:42:35 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 78885 invoked by uid 500); 23 Feb 2007 14:42:35 -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 78871 invoked by uid 99); 23 Feb 2007 14:42:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 06:42:35 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2007 06:42:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D742C7141EE for ; Fri, 23 Feb 2007 06:42:05 -0800 (PST) Message-ID: <25654327.1172241725879.JavaMail.jira@brutus> Date: Fri, 23 Feb 2007 06:42:05 -0800 (PST) From: "Daniel Bloomfield Ramagem (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Created: (JCR-763) Unable to create and login to different workspaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Unable to create and login to different workspaces -------------------------------------------------- Key: JCR-763 URL: https://issues.apache.org/jira/browse/JCR-763 Project: Jackrabbit Issue Type: Bug Components: jca Affects Versions: 1.2.1 Environment: Geronimo 1.1.1, Java 5r10, Windows XP Reporter: Daniel Bloomfield Ramagem I'm using the Jackrabbit 1.2.1 JCA adapter and trying to have a Servlet create and use two separate workspaces. I get a "java.lang.IllegalStateException: Inactive logical session handle called" error when running the code below: Context ctx = new InitialContext(); Repository repository = (Repository) ctx.lookup("java:comp/env/jackrabbit"); Credentials credentials = new SimpleCredentials("username", "password".toCharArray()); Session session = repository.login(credentials); Workspace workspace = session.getWorkspace(); JackrabbitWorkspace jws = (JackrabbitWorkspace) workspace; jws.createWorkspace("ws1"); jws.createWorkspace ("ws2"); Session s1 = repository.login(credentials, "ws1"); Session s2 = repository.login(credentials, "ws2"); System.out.println("s1.getWorkspace().getName() = " + s1.getWorkspace ().getName()); System.out.println("s2.getWorkspace().getName() = " + s2.getWorkspace().getName()); To make matters worse, when I comment out the lines for the creation of the second workspace (ws2), the code runs fine but I can't seem to login to ws1. On the file system the "ws1" workspace directory got created OK. But the System.out.println prints "default" for the workspace name) Context ctx = new InitialContext(); Repository repository = (Repository) ctx.lookup("java:comp/env/jackrabbit"); Credentials credentials = new SimpleCredentials("username", "password".toCharArray()); Session session = repository.login(credentials); Workspace workspace = session.getWorkspace(); JackrabbitWorkspace jws = (JackrabbitWorkspace) workspace; jws.createWorkspace("ws1"); //jws.createWorkspace ("ws2"); Session s1 = repository.login(credentials, "ws1"); //Session s2 = repository.login(credentials, "ws2"); System.out.println("s1.getWorkspace().getName() = " + s1.getWorkspace ().getName()); //System.out.println("s2.getWorkspace().getName() = " + s2.getWorkspace().getName()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.