Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

JCR Session.logout giving Repository Exception


Level 3

Hi ,

Greetings !

In my code I opened a jcr session by adapting the resolver(resolver from service user).

Please see the code below :


ResourceResolver resolver=getResourceResolver();

           Session session=resolver.adaptTo(Session.class);

//some logic


catch (RepositoryException e)






              if (session != null && session.isLive())





After logging out the session ,it is giving me exception and my page is breaking.Please find the exception below :

21.09.2017 14:47:37.295 *ERROR* [ [1505998057061] GET /content/B2B_HC/en_IN/article.html HTTP/1.1] Exception occured when including component

java.lang.IllegalArgumentException: javax.jcr.RepositoryException: This session has been closed.

I also tried to close the resolver object instead of closing session object following the below article ,still no luck !
Jcr Session is Closed

Please advice.



0 Replies