Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 99352 invoked from network); 21 Oct 2008 07:58:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Oct 2008 07:58:36 -0000 Received: (qmail 10936 invoked by uid 500); 21 Oct 2008 07:58:37 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 10899 invoked by uid 500); 21 Oct 2008 07:58: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 10888 invoked by uid 99); 21 Oct 2008 07:58:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 00:58:37 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 07:57:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6786C234C220 for ; Tue, 21 Oct 2008 00:57:44 -0700 (PDT) Message-ID: <219047004.1224575864422.JavaMail.jira@brutus> Date: Tue, 21 Oct 2008 00:57:44 -0700 (PDT) From: "Alexander Klimetschek (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1823) Repository.login throws IllegalStateException In-Reply-To: <1013422232.1224573584226.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641304#action_12641304 ] Alexander Klimetschek commented on JCR-1823: -------------------------------------------- +1 > Repository.login throws IllegalStateException > --------------------------------------------- > > Key: JCR-1823 > URL: https://issues.apache.org/jira/browse/JCR-1823 > Project: Jackrabbit > Issue Type: Bug > Components: jackrabbit-core > Affects Versions: core 1.4.5 > Reporter: Felix Meschberger > > Calling any login method on Repository instance, which has been shut down throws an IllegalStateException, which is caused by the RepositoryImpl.sanityCheck method. > This exception is unexpected by callers of the login method, which is specified to throw one of LoginException, NoSuchWorkspaceException and RepositoryException. In particular the spec says, that a RepositoryException is thrown "if another error occurs". > So I suggest to modify the RepositoryImpl.login(Credentials, String) as follows (patch against trunk): > Index: /usr/src/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java > =================================================================== > --- /usr/src/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java (revision 706543) > +++ /usr/src/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java (working copy) > @@ -1358,6 +1358,8 @@ > } catch (AccessDeniedException ade) { > // authenticated subject is not authorized for the specified workspace > throw new LoginException("Workspace access denied", ade); > + } catch (RuntimeException re) { > + throw new RepositoryException(re.getMessage(), re); > } finally { > shutdownLock.readLock().release(); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.