Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7529

[osgi] Stale CXF's javax.ws.rs.ext.RuntimeDelegate after refreshing rt-frontend-jaxrs bundle

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.13, 3.2.0
    • 3.1.14, 3.2.1
    • JAX-RS Security, OSGi
    • None
    • Unknown

    Description

      When CXF JAX-RS runtime is initialized, javax.ws.rs.ext.RuntimeDelegate#cachedDelegate still keeps old instance leading to CL leaks and errors like this:

      java.lang.NoClassDefFoundError: org/apache/cxf/jaxrs/impl/MetadataMap$KeyComparator
              at org.apache.cxf.jaxrs.impl.MetadataMap.keySet(MetadataMap.java:178)
              at javax.ws.rs.core.Response.fromResponse(Response.java:573)
              at org.apache.camel.component.cxf.jaxrs.SimpleCxfRsBinding.buildResponse(SimpleCxfRsBinding.java:170)
              at org.apache.camel.component.cxf.jaxrs.SimpleCxfRsBinding.populateCxfRsResponseFromExchange(SimpleCxfRsBinding.java:152)
              at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.returnResponse(CxfRsInvoker.java:184)
              at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.asyncInvoke(CxfRsInvoker.java:110)
              at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:68)
              at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
              at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)
              at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
              at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:278)
              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
              at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)
              at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
              at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
              at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
              at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:218)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:274)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
              at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
              at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
              at org.eclipse.jetty.server.Server.handleAsync(Server.java:545)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:318)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
              at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
              at java.lang.Thread.run(Thread.java:745)
      

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            ggrzybek Grzegorz Grzybek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: