[esb-java-user] NPE when using a Spring Mediator

Asankha C. Perera asankha at wso2.com
Wed Aug 27 09:27:18 PDT 2008


Stefan

You need to provide a target outSequence or an Endpoint for a proxy 
service as well.. and not just an inSequence

asankha

stlecho wrote:
> Hi,
>
> I'm receiving a NullPointerException when sending an XML message to a proxy
> that uses a Spring Mediator.
>
> Proxy Definition
>     <syn:proxy name="Spring-Proxy" transports="https http"
> startOnLoad="true" statistics="enable" trace="enable">
>         <syn:target>
>             <syn:inSequence>
>                 <syn:log level="full" separator=","/>
> 				<!-- try if  applicatonContext.xml can be packed in the JAR that
> contains the MySpringMediator.class file -->
>                 <spring:spring bean="MySpringMediatorBean"
> key="SpringMediatorApplicContext"/> 
>             </syn:inSequence>
>         </syn:target>
>     </syn:proxy>
>
>
> XML Request
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope"><TestFromWSO2ESBSenderTestCase/></soapenv:Envelope>
>
>
> Stacktrace
> 2008-08-27 17:52:14,762 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> ServerHandler HTTP connection [/127.0.0.1:2003]: Connected
> 2008-08-27 17:52:14,762 [192.168.13.175-INFOR2] [I/O dispatcher 7] TRACE
> ServerHandler New incoming connection
> 2008-08-27 17:52:14,809 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> ServerHandler HTTP connection [/127.0.0.1:2003]: POST /soap/Spring-Proxy
> HTTP/1.1
> 2008-08-27 17:52:14,840 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> headers >> POST /soap/Spring-Proxy HTTP/1.1
> 2008-08-27 17:52:14,840 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> headers >> Content-Type: text/xml;charset=UTF-8
> 2008-08-27 17:52:14,840 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> headers >> SOAPAction: urn://fsb.belgium.be/fphp/v3_0/findPerson
> 2008-08-27 17:52:14,840 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> headers >> User-Agent: Jakarta Commons-HttpClient/3.0.1
> 2008-08-27 17:52:14,840 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> headers >> Host: localhost:8280
> 2008-08-27 17:52:14,840 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> headers >> Content-Length: 127
> 2008-08-27 17:52:14,840 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> ServerHandler HTTP connection [LOCALHOST/127.0.0.1:2003]: Input ready
> 2008-08-27 17:52:14,840 [192.168.13.175-INFOR2] [I/O dispatcher 7] DEBUG
> ServerHandler HTTP connection [LOCALHOST/127.0.0.1:2003]: Content decoder
> [content length: 127; pos: 127; completed: true]
> 2008-08-27 17:52:14,871 [192.168.13.175-INFOR2] [HttpServerWorker-1] DEBUG
> TransportUtils createSOAPEnvelope using Builder (class
> org.apache.axis2.builder.SOAPBuilder) selected from type (text/xml)
> 2008-08-27 17:52:14,918 [192.168.13.175-INFOR2] [HttpServerWorker-1] DEBUG
> ProxyServiceMessageReceiver Proxy Service Spring-Proxy received a new
> message from : 127.0.0.1
> 2008-08-27 17:52:14,918 [192.168.13.175-INFOR2] [HttpServerWorker-1] DEBUG
> ProxyServiceMessageReceiver Message To: /soap/Spring-Proxy
> 2008-08-27 17:52:14,918 [192.168.13.175-INFOR2] [HttpServerWorker-1] DEBUG
> ProxyServiceMessageReceiver SOAPAction:
> urn://fsb.belgium.be/fphp/v3_0/findPerson
> 2008-08-27 17:52:14,918 [192.168.13.175-INFOR2] [HttpServerWorker-1] DEBUG
> ProxyServiceMessageReceiver WSA-Action:
> urn://fsb.belgium.be/fphp/v3_0/findPerson
> Exception in thread "HttpServerWorker-1" java.lang.NullPointerException
> 	at
> org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:87)
> 	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> 	at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
> 	at
> org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:253)
> 	at
> org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:194)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> 	at java.lang.Thread.run(Thread.java:595)
>
> Regards, Stefan Lecho.
>   

-- 
Asankha C. Perera

WSO2 - http://wso2.org
http://esbmagic.blogspot.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.wso2.org/pipermail/esb-java-user/attachments/20080827/ed3762c2/attachment.htm 


More information about the Esb-java-user mailing list