Nullpointer exception in Servlet Controller when running in OSGi and changing
the http port at runtime
------------------------------------------------------------------------------------------------------
Key: CXF-4123
URL: https://issues.apache.org/jira/browse/CXF-4123
Project: CXF
Issue Type: Bug
Components: OSGi, Transports
Affects Versions: 2.5.2
Reporter: Christian Schneider
Assignee: Christian Schneider
To reproduce install karaf 2.2.5 and install CXF features.
Install a bundle that offers a service using a servlet.
When Accessing the endpoint all works.
Now change the port of the http service using the pax web config.
Now access the endpoint again and the exception below occurs.
java.lang.NullPointerException
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)[140:org.apache.cxf.bundle:2.5.2]
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:126)[140:org.apache.cxf.bundle:2.5.2]
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)[140:org.apache.cxf.bundle:2.5.2]
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:113)[140:org.apache.cxf.bundle:2.5.2]
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:693)[50:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)[140:org.apache.cxf.bundle:2.5.2]
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)[61:org.eclipse.jetty.servlet:7.5.4.v20111024]
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)[61:org.eclipse.jetty.servlet:7.5.4.v20111024]
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[70:org.ops4j.pax.web.pax-web-jetty:1.0.8]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)[60:org.eclipse.jetty.security:7.5.4.v20111024]
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[70:org.ops4j.pax.web.pax-web-jetty:1.0.8]
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)[61:org.eclipse.jetty.servlet:7.5.4.v20111024]
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[70:org.ops4j.pax.web.pax-web-jetty:1.0.8]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.server.Server.handle(Server.java:349)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)[55:org.eclipse.jetty.http:7.5.4.v20111024]
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)[55:org.eclipse.jetty.http:7.5.4.v20111024]
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)[59:org.eclipse.jetty.server:7.5.4.v20111024]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)[54:org.eclipse.jetty.io:7.5.4.v20111024]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)[54:org.eclipse.jetty.io:7.5.4.v20111024]
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)[53:org.eclipse.jetty.util:7.5.4.v20111024]
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)[53:org.eclipse.jetty.util:7.5.4.v20111024]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira