[ 
https://issues.apache.org/activemq/browse/SM-732?page=comments#action_37356 ] 
            
Horst Studer commented on SM-732:
---------------------------------

Here it is black on white:

{code}
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested 
exception is org.codehaus.xfire.fault.XFireFault: Error sending jbi exchange
org.codehaus.xfire.fault.XFireFault: Error sending jbi exchange
        at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
        at 
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
        at org.codehaus.xfire.client.Client.invoke(Client.java:335)
        at 
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
        at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
        at 
org.apache.servicemix.jsr181.xfire.JbiProxyFactoryBean$1.invoke(JbiProxyFactoryBean.java:71)
        at $Proxy11.getABC(Unknown Source)
        at com.x.y.z.XYZService.getXYZ(XYZService.java:77)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
        at 
org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:271)
        at 
org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:84)
        at 
org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:132)
        at 
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:107)
        at 
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at 
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
        at 
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
        at 
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.doProcess(Jsr181ExchangeProcessor.java:111)
        at 
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:66)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:410)
        at 
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
        at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:177)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:227)
        at 
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown 
Source)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.codehaus.xfire.XFireException: Error sending jbi exchange
        at 
org.apache.servicemix.jsr181.xfire.JbiChannel.send(JbiChannel.java:122)
        at 
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
        ... 31 more
Caused by: java.lang.NullPointerException
        at 
org.apache.servicemix.jsr181.xfire.JbiChannel.send(JbiChannel.java:110)
        ... 32 more
{code}


> Fault-messages cause JbiChannel to throw NullPointerException
> -------------------------------------------------------------
>
>                 Key: SM-732
>                 URL: https://issues.apache.org/activemq/browse/SM-732
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jsr181
>    Affects Versions: 3.0
>         Environment: not relevant
>            Reporter: Horst Studer
>
> From a service (jsr181 pojo), I am calling another service (also implemented 
> as a 
> jsr181 pojo), using a jsr181 proxy. This works fine if the called service 
> returns 
> an out message. 
> If, however, the called service throws an exception (i.e. returns a fault), 
> there 
> is a NullPointerException in ...jsr181.xfire.JbiChannel. 
> There are two problems: 
> After the sendSync, there is a check to see if the exchange 
> status is ERROR, and if not, getOutMessage().getContent() is called. 
> The code assumes that after a fault, the exchange status is ERROR, 
> but in fact, it is ACTIVE and the fault-Message is set, while the 
> out-Message is null. So this causes the NullPointerException. 
> The other problem is that the code for handling the fault-Message 
> is missing (marked as // TODO, but as stated above, with the wrong 
> assumption that the exchange status is ERROR). It would be nice, 
> if the fault message would be processed an cause xfire to throw a 
> corresponding exception on the proxy. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to