java.lang.NullPointerException

Apache's JIRA Issue Tracker | Maciej Majewski | 9 years ago
  1. 0

    Synapse configuration: <definitions xmlns="http://ws.apache.org/ns/synapse"> <in> <log level="full"/> <send> <endpoint> <wsdl uri="http://hostname:2006/echo/echo.wsdl" service="EchoService" port="EchoPort"> <suspendDurationOnFailure>5</suspendDurationOnFailure> <timeout> <duration>3</duration> <action>fault</action> </timeout> </wsdl> </endpoint> </send> </in> <out> <send/> </out> </definitions> When simple 'echo' endpoint is deployed and working - everything is OK. But when I undeploy it and ask Synapse, I've got series of exception: First query: 2007-11-05 10:06:18,460 [ CUT ] [HttpServerWorker-5] INFO LogMediator To: /soap, WSAction: , SOAPAction: , Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:echo="http://www.springframework.org/spring-ws/samples/echo"><soapenv:Body> <echo:echoRequest>test123</echo:echoRequest> </soapenv:Body></soapenv:Envelope> Exception in thread "HttpCoreNIOSender" java.lang.NullPointerException at org.apache.synapse.transport.nhttp.ClientHandler.inputReady(ClientHandler.java:225) at org.apache.synapse.transport.nhttp.LoggingNHttpClientHandler.inputReady(LoggingNHttpClientHandler.java:113) at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:135) at org.apache.synapse.transport.nhttp.PlainClientIOEventDispatch.inputReady(PlainClientIOEventDispatch.java:71) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:94) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:189) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:174) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:137) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:69) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:281) at java.lang.Thread.run(Thread.java:613) Second query: 2007-11-05 10:20:25,461 [ CUT ] [HttpServerWorker-14] ERROR Axis2Sender Unexpected error during sending message out java.lang.IllegalStateException: I/O reactor has been shut down at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.connect(DefaultConnectingIOReactor.java:164) at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRequest(HttpCoreNIOSender.java:285) at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:208) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:192) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:176) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:250) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:55) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:200) at org.apache.synapse.endpoints.WSDLEndpoint.send(WSDLEndpoint.java:140) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:100) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60) at org.apache.synapse.mediators.filters.InMediator.mediate(InMediator.java:60) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:122) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:154) at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:89) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:218) at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:182) 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:613) End every next query ends with this exception. Even if I redeploy echo endpoint, Synapse does not process my requests and responses with 0 bytes: Mon Nov 05 10:13:59 CET 2007:INFO:Got response for [EchoBinding.echo:Request 1] in 18ms (0 bytes) And after a few seconds in logs I have: 2007-11-05 10:19:06,408 [ CUT ] [Timer-0] INFO LogMediator To: /soap, WSAction: , SOAPAction: , Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:echo="http://www.springframework.org/spring-ws/samples/echo"><soapenv:Body> <echo:echoRequest>dupa123</echo:echoRequest> </soapenv:Body></soapenv:Envelope> After restarting Synapse everything backs to normal - so it isn't endpoint's issue.

    Apache's JIRA Issue Tracker | 9 years ago | Maciej Majewski
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Synapse configuration: <definitions xmlns="http://ws.apache.org/ns/synapse"> <in> <log level="full"/> <send> <endpoint> <wsdl uri="http://hostname:2006/echo/echo.wsdl" service="EchoService" port="EchoPort"> <suspendDurationOnFailure>5</suspendDurationOnFailure> <timeout> <duration>3</duration> <action>fault</action> </timeout> </wsdl> </endpoint> </send> </in> <out> <send/> </out> </definitions> When simple 'echo' endpoint is deployed and working - everything is OK. But when I undeploy it and ask Synapse, I've got series of exception: First query: 2007-11-05 10:06:18,460 [ CUT ] [HttpServerWorker-5] INFO LogMediator To: /soap, WSAction: , SOAPAction: , Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:echo="http://www.springframework.org/spring-ws/samples/echo"><soapenv:Body> <echo:echoRequest>test123</echo:echoRequest> </soapenv:Body></soapenv:Envelope> Exception in thread "HttpCoreNIOSender" java.lang.NullPointerException at org.apache.synapse.transport.nhttp.ClientHandler.inputReady(ClientHandler.java:225) at org.apache.synapse.transport.nhttp.LoggingNHttpClientHandler.inputReady(LoggingNHttpClientHandler.java:113) at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:135) at org.apache.synapse.transport.nhttp.PlainClientIOEventDispatch.inputReady(PlainClientIOEventDispatch.java:71) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:94) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:189) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:174) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:137) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:69) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:281) at java.lang.Thread.run(Thread.java:613) Second query: 2007-11-05 10:20:25,461 [ CUT ] [HttpServerWorker-14] ERROR Axis2Sender Unexpected error during sending message out java.lang.IllegalStateException: I/O reactor has been shut down at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.connect(DefaultConnectingIOReactor.java:164) at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRequest(HttpCoreNIOSender.java:285) at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:208) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:192) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:176) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:250) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:55) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:200) at org.apache.synapse.endpoints.WSDLEndpoint.send(WSDLEndpoint.java:140) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:100) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60) at org.apache.synapse.mediators.filters.InMediator.mediate(InMediator.java:60) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:122) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:154) at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:89) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:218) at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:182) 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:613) End every next query ends with this exception. Even if I redeploy echo endpoint, Synapse does not process my requests and responses with 0 bytes: Mon Nov 05 10:13:59 CET 2007:INFO:Got response for [EchoBinding.echo:Request 1] in 18ms (0 bytes) And after a few seconds in logs I have: 2007-11-05 10:19:06,408 [ CUT ] [Timer-0] INFO LogMediator To: /soap, WSAction: , SOAPAction: , Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:echo="http://www.springframework.org/spring-ws/samples/echo"><soapenv:Body> <echo:echoRequest>dupa123</echo:echoRequest> </soapenv:Body></soapenv:Envelope> After restarting Synapse everything backs to normal - so it isn't endpoint's issue.

    Apache's JIRA Issue Tracker | 9 years ago | Maciej Majewski
    java.lang.NullPointerException
  4. 0

    When submitting a GET request to a synapse proxy service that points to a REST webservice AND Content-Type is not text/xml or application/xml the error: "Cannot create DocumentElement without destination EPR" comes out. (e.g try to approach the service proxy with a webbrowers and it will do this) configuration is as follows: <definitions xmlns="http://ws.apache.org/ns/synapse"> <proxy name="Forwarder"> <target> <endpoint> <address uri="http://localhost:11111/MyService/echo" format="get"/> </endpoint> <outSequence> <send/> </outSequence> </target> </proxy> </definitions> If the message is send with the 'correct' content-type like for example so: curl -G -H "Content-Type: text/xml" http://localhost:8280/Forwarder/mediate Synapse gives me the following output: 2008-06-18 15:10:59,714 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [/0:0:0:0:0:0:0:1%0:56697]: Connected 2008-06-18 15:10:59,732 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [/0:0:0:0:0:0:0:1%0:56697]: GET /soap/Forwarder/mediate HTTP/1.1 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> GET /soap/Forwarder/mediate HTTP/1.1 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Host: localhost:8280 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Accept: */* 2008-06-18 15:10:59,780 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG headers >> Content-Type:application/xml 2008-06-18 15:10:59,797 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG TransportUtils createSOAPEnvelope using Builder (class org.apache.axis2.builder.ApplicationXMLBuilder) selected from type (application/xml) 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseMessageReceiver Synapse received a new message for message mediation... 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseMessageReceiver Received To: null 2008-06-18 15:10:59,841 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseMessageReceiver SOAPAction: null 2008-06-18 15:10:59,843 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SynapseMessageReceiver WSA-Action: null 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG Axis2SynapseEnvironment Injecting MessageContext 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG Axis2SynapseEnvironment Using Main Sequence for injected message 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SequenceMediator Start : Sequence <main> 2008-06-18 15:10:59,845 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SequenceMediator Sequence <SequenceMediator> :: mediate() 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG LogMediator Start : Log mediator 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] INFO LogMediator To: , MessageID: urn:uuid:27AA6F4DF24676A7641213794659778, Direction: request 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG LogMediator End : Log mediator 2008-06-18 15:10:59,846 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG DropMediator Start : Drop mediator 2008-06-18 15:10:59,852 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG DropMediator End : Drop mediator 2008-06-18 15:10:59,852 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG SequenceMediator End : Sequence <main> 2008-06-18 15:10:59,853 [10.0.0.12-equilibrium.local] [HttpServerWorker-1] DEBUG ServerWorker Sending 202 Accepted response for MessageID : urn:uuid:27AA6F4DF24676A7641213794659778 response written : null response will follow : true acked : false forced ack : false 2008-06-18 15:10:59,862 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: Output ready 2008-06-18 15:10:59,863 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: Content encoder [chunk-coded; completed: true] 2008-06-18 15:10:59,864 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [localhost/0:0:0:0:0:0:0:1%0:56697]: Response ready 2008-06-18 15:10:59,865 [10.0.0.12-equilibrium.local] [I/O dispatcher 5] DEBUG ServerHandler HTTP connection [closed]: Closed

    Apache's JIRA Issue Tracker | 8 years ago | Jasper Spoel
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.apache.synapse.transport.nhttp.ClientHandler.inputReady()
    2. Apache Synapse - Non-blocking HTTP/s Transport
      LoggingNHttpClientHandler.inputReady
      1. org.apache.synapse.transport.nhttp.ClientHandler.inputReady(ClientHandler.java:225)
      2. org.apache.synapse.transport.nhttp.LoggingNHttpClientHandler.inputReady(LoggingNHttpClientHandler.java:113)
      2 frames
    3. Apache HttpCore NIO
      DefaultNHttpClientConnection.consumeInput
      1. org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:135)
      1 frame
    4. Apache Synapse - Non-blocking HTTP/s Transport
      PlainClientIOEventDispatch.inputReady
      1. org.apache.synapse.transport.nhttp.PlainClientIOEventDispatch.inputReady(PlainClientIOEventDispatch.java:71)
      1 frame
    5. Apache HttpCore NIO
      AbstractMultiworkerIOReactor$Worker.run
      1. org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:94)
      2. org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:189)
      3. org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:174)
      4. org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:137)
      5. org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:69)
      6. org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:281)
      6 frames
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:613)
      1 frame