synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <>
Subject [jira] Commented: (SYNAPSE-205) NPE in HttpCoreNIOSender and "I/O reactor has been shut down"
Date Tue, 08 Jan 2008 10:10:34 GMT


Oleg Kalnichevski commented on SYNAPSE-205:


Unlike classic I/O NIO does not use SocketTimeoutException to signal a timeout on a socket
read operation and leaves it up to the transport layer to decide how to propagate the timeout
condition to the application layer. So, in case of session request failing due to a timeout
there is no exception instance to start with, which could be propagated to the SessionRequestCallback.
Theoretically I could create one, but do not see a point in doing so. SessionRequestCallback
implementations ought to be prepared to deal with SessionRequest#getException() being null
especially in case of a timeout.

Hope this helps


> NPE in HttpCoreNIOSender and "I/O reactor has been shut down"
> -------------------------------------------------------------
>                 Key: SYNAPSE-205
>                 URL:
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Priority: Critical
>             Fix For: 1.2
>         Attachments: synapse-205.patch.txt
> When the target service is not available, a request to the proxy service causes the following
> Exception in thread "HttpCoreNIOSender" java.lang.NullPointerException
> 	at org.apache.synapse.transport.nhttp.HttpCoreNIOSender$3.handleError(
> 	at org.apache.synapse.transport.nhttp.HttpCoreNIOSender$3.timeout(
> 	at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(
> 	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(
> 	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(
> 	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(
> 	at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.executeClientEngine(
> 	at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.access$000(
> 	at org.apache.synapse.transport.nhttp.HttpCoreNIOSender$
> 	at
> Any further request then fails with "java.lang.IllegalStateException: I/O reactor has
been shut down".
> The instruction in HttpCoreNIOSender that causes the NPE is as follows:
> MessageContext nioFaultMessageContext =
>     MessageContextBuilder.createFaultMessageContext(
>         mc, new AxisFault(exception.toString(), exception));
> Probably, when handleError is called by the timeout (rather than the failed) method,
as is the case here (see stacktrace), exception is null. The handleError method doesn't handle
this situation appropriately.
> Note that this issue is similar but not identical to the one described in SYNAPSE-168.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message