Krzysztof Sobkowiak created SM-2313:
---------------------------------------
Summary: Trying to get person with unknown end with error in
camel-cxf-soap example
Key: SM-2313
URL: https://issues.apache.org/jira/browse/SM-2313
Project: ServiceMix
Issue Type: Task
Components: examples
Affects Versions: 5.0.2, 5.1.0, 6.0.0
Reporter: Krzysztof Sobkowiak
Priority: Minor
Fix For: 5.0.2, 5.1.1, 6.0.0
The example generally works (creating, deleting, getting existing person), but
trying to get a person with non-existing id causes following stacktrace on the
console
{code}
java.lang.NullPointerException
at
org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:83)
at
org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:101)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:81)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at
org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:242)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:65)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1046)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:982)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:193)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handleAsync(Server.java:407)
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:491)
at
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)
{code}
The log contains following entry
{code}
2014-05-28 21:22:27,043 | INFO | qtp57984477-280 | getPerson
| ? ? | 109 -
org.apache.camel.camel-core - 2.13.1 | getPerson invocation with id: 1
2014-05-28 21:22:27,048 | WARN | qtp57984477-280 | PhaseInterceptorChain
| ? ? | 130 - org.apache.cxf.cxf-api -
2.7.11 | Interceptor for
{http://soap.camel.examples.servicemix.apache.org/}PersonService#{http://soap.camel.examples.servicemix.apache.org/}getPerson
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault
at
org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:107)[130:org.apache.cxf.cxf-api:2.7.11]
at
org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:101)[144:org.apache.cxf.cxf-rt-frontend-jaxws:2.7.11]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)[130:org.apache.cxf.cxf-api:2.7.11]
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:81)[130:org.apache.cxf.cxf-api:2.7.11]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)[130:org.apache.cxf.cxf-api:2.7.11]
at
org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:242)[130:org.apache.cxf.cxf-api:2.7.11]
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)[130:org.apache.cxf.cxf-api:2.7.11]
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355)[145:org.apache.cxf.cxf-rt-transports-http-jetty:2.7.11]
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319)[145:org.apache.cxf.cxf-rt-transports-http-jetty:2.7.11]
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:65)[145:org.apache.cxf.cxf-rt-transports-http-jetty:2.7.11]
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1046)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:982)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:193)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.server.Server.handleAsync(Server.java:407)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:491)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)[66:org.eclipse.jetty.http:7.6.9.v20130131]
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)[66:org.eclipse.jetty.http:7.6.9.v20130131]
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[65:org.eclipse.jetty.server:7.6.9.v20130131]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)[62:org.eclipse.jetty.io:7.6.9.v20130131]
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)[62:org.eclipse.jetty.io:7.6.9.v20130131]
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[74:org.eclipse.jetty.util:7.6.9.v20130131]
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[74:org.eclipse.jetty.util:7.6.9.v20130131]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_55]
{code}
I haven't analyzed the code but the implementation of the service does not
correctly handle the case when the request contains id which dos not exist.
--
This message was sent by Atlassian JIRA
(v6.2#6252)