Issue

Either or these errors is randomly logged in the AEM logs:

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

java.lang.IllegalStateException: Resource resolver is already closed.

Cause

This can be caused by multi-threaded use of the same ResourceResolver or by closing a ResourceResolver or javax.jcr.Session that you didn't open in your own code.

Resolution

Session and ResourceResolver objects that are obtained via the SlingRequest or WorkflowSession do not close by your application.  For example:

slingRequest.getResourceResolver().adaptTo(Session.class);
//Or
workflowSession.getSession();

That resolver or session closes automatically after the request has been processed.

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책