Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
2.7.1-fuse-00-27, 2.7.1-fuse-00-43
-
None
-
None
Description
As suggested in Adrian Trenaman's Webinar on Camel+CXF, I tried to configure a camel-cxf endpoint such that it uses the DEFAULT Jetty container. For example:
<cxf:cxfEndpoint id="customer-ws" address="/Customer" endpointName="c:SOAPOverHTTP" serviceName="c:CustomerService" wsdlURL="wsdl/CustomerService.wsdl" xmlns:c="http://demo.fusesource.com/wsdl/CustomerService/"/> ...
Notice the setting address="/Customer" which implicitly asks the CXF component to deploy this endpoint into the default Jetty container (e.g. in Fuse ESB, the default Jetty container for CXF is configured to listen on http://localhost:8181/cxf, so the preceding config ultimately resolves to the endpoint address, http://localhost:8181/cxf/Customer). However, if I try to invoke on this endpoint in the Fuse ESB 4.4 OSGi container, I get the following error:
15:06:21,718 | WARN | qtp19799968-60 | PhaseInterceptorChain | - - | Interceptor for {http://demo.fusesource.com/wsdl/CustomerService/}CustomerService#{http://demo.fusesource.com/wsdl/CustomerService/}getCustomerStatus has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: org.eclipse.jetty.server.Request.startAsync(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)Ljavax/servlet/AsyncContext; at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:122)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)[169:org.apache.geronimo.specs.geronimo-servlet_3.0_spec:1.0] at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)[110:org.eclipse.jetty.servlet:7.4.1.v20110513] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)[110:org.eclipse.jetty.servlet:7.4.1.v20110513] at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[162:org.ops4j.pax.web.pax-web-jetty:1.0.3] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517)[112:org.eclipse.jetty.security:7.4.1.v20110513] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:116)[162:org.ops4j.pax.web.pax-web-jetty:1.0.3] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)[110:org.eclipse.jetty.servlet:7.4.1.v20110513] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[162:org.ops4j.pax.web.pax-web-jetty:1.0.3] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.server.Server.handle(Server.java:346)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)[107:org.eclipse.jetty.http:7.4.1.v20110513] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220)[107:org.eclipse.jetty.http:7.4.1.v20110513] at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[109:org.eclipse.jetty.server:7.4.1.v20110513] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:531)[111:org.eclipse.jetty.io:7.4.1.v20110513] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[111:org.eclipse.jetty.io:7.4.1.v20110513] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[114:org.eclipse.jetty.util:7.4.1.v20110513] at java.lang.Thread.run(Thread.java:662)[:1.6.0_24] Caused by: java.lang.AbstractMethodError: org.eclipse.jetty.server.Request.startAsync(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)Ljavax/servlet/AsyncContext; at org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation.<init>(Servlet3ContinuationProvider.java:77)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.transport.http.Servlet3ContinuationProvider.getContinuation(Servlet3ContinuationProvider.java:58)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.camel.component.cxf.CxfConsumer$1.getContinuation(CxfConsumer.java:125)[126:org.apache.camel.camel-cxf:2.7.1.fuse-00-27] at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:68)[126:org.apache.camel.camel-cxf:2.7.1.fuse-00-27] at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_24] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_24] at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_24] at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[123:org.apache.cxf.bundle:2.4.0.fuse-00-27] ... 34 more
It seems that the AbstractMethodError error is thrown by the JVM when you try to invoke an out-of-date method on a Java interface. In other words, it looks like this might be some kind of version mismatch between the underlying CXF code and the Jetty API.
Note that if you specify the endpoint URI explicitly (e.g. address="http://localhost:8181/cxf/Customer") the error does NOT occur. It only affects the URI syntax for the default Jetty container.