Expand my Community achievements bar.

SOLVED

Session getting closed in custom service

Avatar

Level 3

Hi All,

We have created a service which will iterate a huge number of nodes and do certain operations. But after iterating over a few nodes, the session is getting closed and we are getting an exception as below.

: This session has been closed

  1. java.lang.IllegalStateException: This session has been closed

      at com.google.common.base.Preconditions.checkState(Preconditions.java:150)

      at org.apache.jackrabbit.oak.core.ContentSessionImpl.checkLive(ContentSessionImpl.java:85)

      at org.apache.jackrabbit.oak.core.MutableRoot.checkLive(MutableRoot.java:172)

      at org.apache.jackrabbit.oak.core.MutableTree.beforeRead(MutableTree.java:333)

      at org.apache.jackrabbit.oak.core.MutableTree.getPath(MutableTree.java:108)

      at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.getPath(NodeDelegate.java:116)

The session timeout configured in "Apache Felix Jetty Based Http Service" is 10. We tried by making the time as 0. But still the same issue persist.

It would be grateful if any could help us in solving this.

Thanks,

Akhila

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

The problem is not the session timeout you have configured, because this only affects HTTP sessions (not repository sessions).

I never came across the problem you described, it's most likely a bug in your code.

kind regards,
Jörg

View solution in original post

2 Replies

Avatar

Level 5

try giving some negative number

Avatar

Correct answer by
Employee Advisor

The problem is not the session timeout you have configured, because this only affects HTTP sessions (not repository sessions).

I never came across the problem you described, it's most likely a bug in your code.

kind regards,
Jörg