We are getting sling exception when multiple users load a page or when 2 actions are performed simultaneously . The log says resolver is already closed , but the resolver is not closed in the code explicitly . We have extended SCF Forum component and created a custom component which is being used in this page. The exception occurs when we call super() i.e, AbstractPost.java and AbstractComment.java
Below is the exception in OOTB methods :
caused by: java.lang.IllegalStateException: Resource resolver is already closed.
at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.checkClosed(ResourceResolverImpl.java:186) [org.apache.sling.resourceresolver:1.5.34]
at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.adaptTo(ResourceResolverImpl.java:807) [org.apache.sling.resourceresolver:1.5.34]
It looks like that you have closed teh resourceresolver some time earlier in the rendering process. Check your code for any resourceresolver.close() and validate that you call this only on a ResourceResolver which you have opened before.