Hi,
I'm having a strange problem while executing a compatibility tests suite
for Jersey and CXF. All tests running twice as parameterized unit tests
where the first run uses Jersey and the second run is with CXF.
Unfortunately CXF is throwing an WebApplicationException as you can see
from the trace below. If I disable the Jersey run then CXF does not show
errors. It seems that CXF struggle with side effects caused by Jersey.
Question is how can this be evaluated. The trace is the only hint that I
have.
Thanks in advance.
Regards,
Stephan
2012-01-28 14:21:17,743 INFO [main]
org.example.test.compatibility.SimpleCompatibilityTest:
******************************************************************
2012-01-28 14:21:17,743 INFO [main]
org.example.test.compatibility.SimpleCompatibilityTest: Activated Server
Type = CXF
2012-01-28 14:21:17,743 INFO [main]
org.example.test.compatibility.SimpleCompatibilityTest:
******************************************************************
2012-01-28 14:21:17,743 INFO [main]
org.example.test.compatibility.SimpleCompatibilityTest:
---------------------------------------------------------------
2012-01-28 14:21:17,743 INFO [main]
org.example.test.compatibility.SimpleCompatibilityTest: test class:
org.example.test.compatibility.SimpleCompatibilityTest
2012-01-28 14:21:17,744 INFO [main]
org.example.test.compatibility.SimpleCompatibilityTest: test method:
testSimple
2012-01-28 14:21:17,744 INFO [main]
org.example.test.compatibility.SimpleCompatibilityTest:
---------------------------------------------------------------
2012-01-28 14:21:17,764 INFO [main] org.apache.cxf.endpoint.ServerImpl:
Setting the server's publish address to be /
2012-01-28 14:21:17,765 INFO [main]
org.apache.cxf.jaxrs.provider.ProviderFactory: Problem with setting the
default provider
org.apache.cxf.jaxrs.provider.JSONProviderorg/codehaus/jettison/mapped/TypeConverter
2012-01-28 14:21:17,766 DEBUG [main] org.apache.cxf.endpoint.ServerImpl:
Server is starting.
2012-01-28 14:21:17,766 DEBUG [main]
org.apache.cxf.transport.servlet.ServletDestination: registering
incoming
observer: org.apache.cxf.transport.ChainInitiationObserver@3c095f75
2012-01-28 14:21:17,766 DEBUG [main] org.apache.cxf.endpoint.ServerImpl:
register the server to serverRegistry
2012-01-28 14:21:17,775 INFO [main]
org.example.test.compatibility.SimpleCompatibilityTest: uri:
http://localhost:8810/test/test.svc/root/simple
2012-01-28 14:21:17,775 DEBUG [main]
org.example.test.compatibility.jersey.JerseyTestClient:
getResource(), uri
= http://localhost:8810/test/test.svc/root/simple
2012-01-28 14:21:17,952 DEBUG [qtp1692156427-42]
org.apache.cxf.transport.servlet.ServletController: Service http
request on
thread: Thread[qtp1692156427-42,5,main]
2012-01-28 14:21:17,952 DEBUG [qtp1692156427-42]
org.apache.cxf.transport.http.AbstractHTTPDestination: Create a new
message
for processing
2012-01-28 14:21:17,959 DEBUG [qtp1692156427-42]
org.apache.cxf.transport.http.Headers: Request Headers:
{Accept=[text/html,
image/gif, image/jpeg, *; q=.2, */*; q=.2], Cache-Control=[no-cache],
connection=[keep-alive], Content-Type=[null], Host=[localhost:8810],
Pragma=[no-cache], User-Agent=[Java/1.6.0_29]}
2012-01-28 14:21:17,976 DEBUG [qtp1692156427-42]
org.apache.cxf.phase.PhaseInterceptorChain: Adding interceptor
org.apache.cxf.interceptor.ServiceInvokerInterceptor@7bc2f501 to phase
invoke
2012-01-28 14:21:17,976 DEBUG [qtp1692156427-42]
org.apache.cxf.phase.PhaseInterceptorChain: Adding interceptor
org.apache.cxf.interceptor.OutgoingChainInterceptor@1d286180 to phase
post-invoke
2012-01-28 14:21:17,976 DEBUG [qtp1692156427-42]
org.apache.cxf.phase.PhaseInterceptorChain: Adding interceptor
org.apache.cxf.interceptor.OneWayProcessorInterceptor@46192974<tel:46192974>
to phase pre-logical
2012-01-28 14:21:17,976 DEBUG [qtp1692156427-42]
org.apache.cxf.phase.PhaseInterceptorChain: Adding interceptor
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@1df0a2a0 to phase
unmarshal
2012-01-28 14:21:17,977 DEBUG [qtp1692156427-42]
org.apache.cxf.phase.PhaseInterceptorChain: Adding interceptor
org.apache.cxf.transport.https.CertConstraintsInterceptor@653cca0e to
phase pre-stream
2012-01-28 14:21:17,977 DEBUG [qtp1692156427-42]
org.apache.cxf.phase.PhaseInterceptorChain: Chain
org.apache.cxf.phase.PhaseInterceptorChain@24c98b07 was created. Current
flow:
pre-stream [CertConstraintsInterceptor]
unmarshal [JAXRSInInterceptor]
pre-logical [OneWayProcessorInterceptor]
invoke [ServiceInvokerInterceptor]
post-invoke [OutgoingChainInterceptor]
2012-01-28 14:21:17,977 DEBUG [qtp1692156427-42]
org.apache.cxf.phase.PhaseInterceptorChain: Invoking handleMessage on
interceptor
org.apache.cxf.transport.https.CertConstraintsInterceptor@653cca0e
2012-01-28 14:21:17,978 DEBUG [qtp1692156427-42]
org.apache.cxf.phase.PhaseInterceptorChain: Invoking handleMessage on
interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@1df0a2a0
2012-01-28 14:21:17,983 WARN [qtp1692156427-42]
org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper:
WebApplicationException has been caught : no cause is available
2012-01-28 14:21:17,984 DEBUG [qtp1692156427-42]
org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper: no cause is
available
javax.ws.rs.WebApplicationException
at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:139)
at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:89)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
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.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)
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.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
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:680)
2