Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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] com.philips.webcms.foundation.base.tags.ActionTag 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