On Mon, Feb 13, 2012 at 07:42:03PM +0530, Kasun Indrasiri wrote:
> On Mon, Feb 13, 2012 at 11:49 AM, Kasun Indrasiri <[email protected]>wrote:
>
> > Hi all,
> >
> > When we use httpcore-4.1.3 with Apache Synapse, we observed(intermittent
> > issue) that the getContext method return null for non-null connection :
> > org.apache.http.nio.NHttpClientConnection
> > (org.apache.http.nio.NHttpConnection).
> >
> > Any thoughts on a possible scenario that can cause this issue?
> >
> We suspect that this scenario occurs when there is a connection timeout
> between the back-end and synapse. Anyway, the connection's context should
> not be null, I guess.
>
Hi Kasun
The context variable is non-final, so theoretically it can be null, but this
variable is never set to null anywhere in HttpCore.
Hope this helps somewhat.
Oleg
> >
> > Here is the stack trace We got from synapse. Obviously, we haven't done
> > any null checks for getContext().
> > TID: [] [WSO2 ESB] [2012-02-13 00:28:33,257] ERROR
> > {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during
> > sending message out {org.apache.synapse.core.axis2.Axis2Sender}
> > java.lang.NullPointerException
> > at
> > org.apache.synapse.transport.nhttp.debug.ClientConnectionDebug.recordRequestStartTime(ClientConnectionDebug.java:58)
> > at
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRequest(HttpCoreNIOSender.java:420)
> > at
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:303)
> > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
> > at
> > org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:193)
> > at
> > org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:175)
> > at
> > org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> > at
> > org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:441)
> > at
> > org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57)
> > at
> > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:281)
> > at
> > org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:297)
> > at
> > org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
> > at
> > org.apache.synapse.endpoints.LoadbalanceEndpoint.send(LoadbalanceEndpoint.java:126)
> > at
> > org.apache.synapse.endpoints.IndirectEndpoint.send(IndirectEndpoint.java:54)
> > at
> > org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:87)
> > at
> > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
> > at
> > org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
> > at
> > org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:170)
> > at
> > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
> > at
> > org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> > at
> > org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:66)
> > at
> > org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:108)
> > at
> > org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
> > at
> > org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
> > at
> > org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:144)
> > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
> > at
> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
> > at
> > org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:409)
> > at
> > org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
> > at
> > org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >
> > Thanks,
> > --
> > Kasun Indrasiri
> > Associate Technical Lead,
> > WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/
> > Blog : http://kasunpanorama.blogspot.com/
> >
> >
>
>
> --
> Kasun Indrasiri
> Associate Technical Lead,
> WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/
> Blog : http://kasunpanorama.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]