[ https://issues.apache.org/jira/browse/SLING-6378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15735746#comment-15735746 ]
Felix Meschberger commented on SLING-6378: ------------------------------------------ The problem is that the traditional {{HttpService}} implementation ignores any whiteboard registered listeners including the Sling Auth Core {{ServletRequestListener}}. Therefore for the DavEx servlet, the listener is not called. I see two options: (1) Manually cleanup as proposed in the previous comment or (2) investigate migrating the DavEx servlet to be a whiteboard servlet. > Unclosed ResourceResolver in davex AuthHttpContext > -------------------------------------------------- > > Key: SLING-6378 > URL: https://issues.apache.org/jira/browse/SLING-6378 > Project: Sling > Issue Type: Bug > Components: JCR > Affects Versions: JCR Davex 1.3.4 > Reporter: Julian Sedding > Fix For: JCR Davex 1.3.6 > > > The changes in SLING-6375 reveal an unclosed ResourceResolver in > {{org.apache.sling.jcr.davex.impl.servlets.AuthHttpContext}}. The > {{AuthHttpContext}} delegates to {{SlingAuthenticator}} to open the RR. > However, {{SlingAuthenticator}} relies on > {{ServletRequestListener##requestDestroyed}} to be called in order to close > the RR. It seems that this does not happen in this case, as > {{SlingAuthenticator}} is called directly in this case. > {noformat} > 08.12.2016 14:43:19.385 *INFO* [Apache Sling Resource Resolver Finalizer > Thread] > org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl > Unclosed ResourceResolver was created here: > java.lang.Exception: null > at > org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl$ResolverReference.<init>(CommonResourceResolverFactoryImpl.java:466) > at > org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.register(CommonResourceResolverFactoryImpl.java:200) > at > org.apache.sling.resourceresolver.impl.ResourceResolverImpl.<init>(ResourceResolverImpl.java:117) > at > org.apache.sling.resourceresolver.impl.ResourceResolverImpl.<init>(ResourceResolverImpl.java:110) > at > org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.getResourceResolverInternal(CommonResourceResolverFactoryImpl.java:245) > at > org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.getResourceResolver(CommonResourceResolverFactoryImpl.java:155) > at > org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl.getResourceResolver(ResourceResolverFactoryImpl.java:101) > at > org.apache.sling.auth.core.impl.SlingAuthenticator.getAnonymousResolver(SlingAuthenticator.java:869) > at > org.apache.sling.auth.core.impl.SlingAuthenticator.doHandleSecurity(SlingAuthenticator.java:500) > at > org.apache.sling.auth.core.impl.SlingAuthenticator.handleSecurity(SlingAuthenticator.java:459) > at > org.apache.sling.jcr.davex.impl.servlets.AuthHttpContext.handleSecurity(AuthHttpContext.java:85) > at > org.apache.felix.http.base.internal.service.ServletContextImpl.handleSecurity(ServletContextImpl.java:421) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:57) > at > org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128) > at > org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) > at org.eclipse.jetty.server.Server.handle(Server.java:523) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) > at > org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) > at java.lang.Thread.run(Thread.java:745) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)