CXF
  1. CXF
  2. CXF-4185

Unable to access services via browser after installation of war feature in Karaf 2.2.6

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.5.3, 2.6
    • Component/s: OSGi, Transports
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      After installation of war feature to the container I can't access http://localhost:8040/services via browser.

      HTTP ERROR 500
      Problem accessing /services. Reason:
      Server Error

      Caused by:
      java.lang.NullPointerException
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
      at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:127)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:115)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
      at org.eclipse.jetty.server.Server.handle(Server.java:349)
      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
      at java.lang.Thread.run(Thread.java:619)

      During installation of war feature method CXFNonSpringServlet.init(ServletConfig sc) is called.
      During this call fields 'destinationRegistry' and 'bus' are null.
      So, ServletController is created with field destinationRegistry=null after CXFNonSpringServlet.createServletController(ServletConfig servletConfig) call from init method.

      After this when I try to access http://localhost:8040/services/ via browser ServletController.invoke(HttpServletRequest request, HttpServletResponse res) is called.
      And as destinationRegistry=null, then destinationRegistry.getDestinationForPath(pathInfo, true) call causes NullPointerException.

        Activity

        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Daniel Kulp made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.5.3 [ 12319491 ]
        Fix Version/s 2.6 [ 12319252 ]
        Resolution Fixed [ 1 ]
        Daniel Kulp made changes -
        Component/s OSGi [ 12312463 ]
        Component/s Transports [ 12311342 ]
        Daniel Kulp made changes -
        Field Original Value New Value
        Assignee Daniel Kulp [ dkulp ]
        Alexander Osadchiy created issue -

          People

          • Assignee:
            Daniel Kulp
            Reporter:
            Alexander Osadchiy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development