You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Edgar Vonk (JIRA)" <ji...@apache.org> on 2013/05/01 16:12:15 UTC

[jira] [Commented] (JCR-3246) UserManagerImpl attempts to close session twice on shutdown

    [ https://issues.apache.org/jira/browse/JCR-3246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13646608#comment-13646608 ] 

Edgar Vonk commented on JCR-3246:
---------------------------------

Hi. 

Is there any news on this issue? It is really quite annoying. We now have to explicitly disable these warnings in our (log4j) logging configurations to avoid waking up our sys admins. ;-)
{code:xml}
	<!-- get rid of the (non-critical) 'Attempt to close session-XX after it has already been closed.' warnings -->
	<!-- see: https://issues.apache.org/jira/browse/JCR-3246 -->
	<category name="org.apache.jackrabbit.core.session.SessionState">
		<priority value="ERROR"/>
	</category>
{code}
                
> UserManagerImpl attempts to close session twice on shutdown
> -----------------------------------------------------------
>
>                 Key: JCR-3246
>                 URL: https://issues.apache.org/jira/browse/JCR-3246
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.4
>            Reporter: Jan Haderka
>            Priority: Minor
>         Attachments: JCR-3246.patch
>
>
> On shutdown sessions are being closed twice which lead to the exception being logged as shown below. As far as I can tell {{RepositoryImpl}} has system sessions in the list of active sessions which is why it tries to close them twice - first time when closing all active sessions {{(RepositoryImpl.java:1078)}} and second time when disposing workspace {{(RepositoryImpl.java:1090)}}.
> {noformat}
> 2012-02-28 10:36:00,614 WARN  org.apache.jackrabbit.core.session.SessionState   : Attempt to close session-31 after it has already been closed. Please review your code for proper session management.
> java.lang.Exception: Stack trace of the duplicate attempt to close session-31
> 	at org.apache.jackrabbit.core.session.SessionState.close(SessionState.java:280)
> 	at org.apache.jackrabbit.core.SessionImpl.logout(SessionImpl.java:943)
> 	at org.apache.jackrabbit.core.XASessionImpl.logout(XASessionImpl.java:392)
> 	at org.apache.jackrabbit.core.security.user.UserManagerImpl.loggedOut(UserManagerImpl.java:1115)
> 	at org.apache.jackrabbit.core.SessionImpl.notifyLoggedOut(SessionImpl.java:565)
> 	at org.apache.jackrabbit.core.SessionImpl.logout(SessionImpl.java:979)
> 	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doDispose(RepositoryImpl.java:2200)
> 	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.dispose(RepositoryImpl.java:2154)
> 	at org.apache.jackrabbit.core.RepositoryImpl.doShutdown(RepositoryImpl.java:1090)
> 	at org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:1041)
> 	at org.apache.jackrabbit.core.jndi.BindableRepository.shutdown(BindableRepository.java:259)
> 	at org.apache.jackrabbit.core.jndi.RegistryHelper.unregisterRepository(RegistryHelper.java:94)
>        ...
> 2012-02-28 10:36:00,617 WARN  org.apache.jackrabbit.core.session.SessionState   : session-31 has already been closed. See the attached exception for a trace of where this session was closed.
> java.lang.Exception: Stack trace of  where session-31 was originally closed
> 	at org.apache.jackrabbit.core.session.SessionState.close(SessionState.java:275)
> 	at org.apache.jackrabbit.core.SessionImpl.logout(SessionImpl.java:943)
> 	at org.apache.jackrabbit.core.XASessionImpl.logout(XASessionImpl.java:392)
> 	at org.apache.jackrabbit.core.RepositoryImpl.doShutdown(RepositoryImpl.java:1078)
> 	at org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:1041)
> 	at org.apache.jackrabbit.core.jndi.BindableRepository.shutdown(BindableRepository.java:259)
> 	at org.apache.jackrabbit.core.jndi.RegistryHelper.unregisterRepository(RegistryHelper.java:94)
>        ...
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira