hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasun Indrasiri <kasun...@gmail.com>
Subject Re: Can the context of a NHttpConnection becomes null?
Date Mon, 13 Feb 2012 14:12:03 GMT
On Mon, Feb 13, 2012 at 11:49 AM, Kasun Indrasiri <kasun147@gmail.com>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.

>
> 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/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message