[ 
https://issues.apache.org/jira/browse/OAK-12379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Reschke closed OAK-12379.
--------------------------------

> Oak should log where a session was closed
> -----------------------------------------
>
>                 Key: OAK-12379
>                 URL: https://issues.apache.org/jira/browse/OAK-12379
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: core
>    Affects Versions: 2.6.0
>            Reporter: Joerg Hoh
>            Assignee: Joerg Hoh
>            Priority: Major
>             Fix For: 2.8.0
>
>
> I have a case where the page rendering in AEM sometimes (very rarely and 
> absolutely non-reproducible) breaks with the underlying exception "This 
> session has been closed". Unfortunately it's absolutely not obvious where 
> this happens and despite lengthy code analysis sessions I have not found it.
> The exception is like this:
> {noformat}
> [...]
> Caused by: javax.jcr.RepositoryException: This session has been closed.
>         at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.checkAlive(SessionDelegate.java:378)
>  [org.apache.jackrabbit.oak-jcr:2.4.0]
>         at 
> org.apache.jackrabbit.oak.jcr.delegate.ItemDelegate.checkAlive(ItemDelegate.java:83)
>  [org.apache.jackrabbit.oak-jcr:2.4.0]
>         at 
> org.apache.jackrabbit.oak.jcr.session.operation.ItemOperation.checkPreconditions(ItemOperation.java:34)
>  [org.apache.jackrabbit.oak-jcr:2.4.0]
>         at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:683)
>  [org.apache.jackrabbit.oak-jcr:2.4.0]
>         at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performNullable(SessionDelegate.java:270)
>  [org.apache.jackrabbit.oak-jcr:2.4.0]
>         at 
> org.apache.jackrabbit.oak.jcr.session.NodeImpl.getPropertyOrNull(NodeImpl.java:1666)
>  [org.apache.jackrabbit.oak-jcr:2.4.0]
>         at 
> org.apache.sling.jcr.resource.internal.NodeUtil.getPropertyOrNull(NodeUtil.java:123)
>  [org.apache.sling.jcr.resource:3.3.6]
>         at 
> org.apache.sling.jcr.resource.internal.JcrValueMap.read(JcrValueMap.java:299) 
> [org.apache.sling.jcr.resource:3.3.6]
>         ... 388 common frames omitted
> {noformat}
>  
> When it's tried to access a closed session, it should be logged where the 
> session has been closed. For that we should capture the stacktrace when the 
> session is closed, and attach it to the above exception, so there is a chance 
> that this stacktrace is logged.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to