ServiceMix
  1. ServiceMix
  2. SM-2313

Trying to get person with unknown end with error in camel-cxf-soap example

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0.2, 5.1.0, 6.0.0
    • Fix Version/s: 5.0.2, 5.1.1, 6.0.0.M1, 6.0.0
    • Component/s: examples
    • Labels:
      None

      Description

      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

      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)
      
      

      The log contains following entry

      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]
      

      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.

        Activity

        Hide
        Wim Verreydt added a comment -

        I took a shot at this.
        You can find the result here:
        https://github.com/apache/servicemix/pull/15

        Show
        Wim Verreydt added a comment - I took a shot at this. You can find the result here: https://github.com/apache/servicemix/pull/15
        Show
        Krzysztof Sobkowiak added a comment - Fixed in servicemix-5.1.x https://git-wip-us.apache.org/repos/asf/servicemix/?p=servicemix.git;a=commit;h=f88864d0800d3daca44a30575711f78c7217dc65 https://git-wip-us.apache.org/repos/asf/servicemix/?p=servicemix.git;a=commit;h=7fc9ff70882e13cce67e510765f94595c6768485
        Show
        Krzysztof Sobkowiak added a comment - Fixed in servicemix-5.0.x https://git-wip-us.apache.org/repos/asf/servicemix/?p=servicemix.git;a=commit;h=0f8af5d13916bd308110791b50a128c0387f06cd https://git-wip-us.apache.org/repos/asf/servicemix/?p=servicemix.git;a=commit;h=d60d8b8bc4d89e57675ae428934c18b957e1198d
        Show
        Krzysztof Sobkowiak added a comment - Fixed in master https://git-wip-us.apache.org/repos/asf/servicemix/?p=servicemix.git;a=commit;h=01535abf731b072edce028e5e0db7701bfcd2c8a https://git-wip-us.apache.org/repos/asf/servicemix/?p=servicemix.git;a=commit;h=37fa5ac243134f5bc9187b8b734d50670c42c21b
        Hide
        Krzysztof Sobkowiak added a comment -

        Thanks to Wim for the pull request!!

        Show
        Krzysztof Sobkowiak added a comment - Thanks to Wim for the pull request!!

          People

          • Assignee:
            Krzysztof Sobkowiak
            Reporter:
            Krzysztof Sobkowiak
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development