axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepal Jayasinghe (JIRA)" <>
Subject [jira] Commented: (AXIS2-764) using sendreceive(blocking) it throws a nullPointerException
Date Thu, 01 Jun 2006 12:08:31 GMT
    [ ] 

Deepal Jayasinghe commented on AXIS2-764:

In the first place I didnt know that I had to use Async messageReceiver that is why I was
not able to generate the issue. But after you comment I was able to re-generate the problem
and found that it is a bug in axis2 and not easy to fix;that happen in following manner;
 -In the case of server side asynchronous once the message receiver get the message it will
create a thread and add that to the thread pool
 -immediately after that java return will happen till transport receiver and it will check
the message context whether response is written or not
- In this particular case that flag is false and transport receiver will write HTTP 200
- So the client side transport sender will be trigged and it will try to read the stream
 -But that dose not have anything (body is empty)
 - So you are getting that exception
 - And after that transport sender at the server side will send the actual response ,but at
that point client has already thrown the exception.

The solution to this problem is to write client side in the asynchronous manner ; as follows

       OMElement payload = createDummyOMElement("echoElementAll");
        Options options = new Options();
        ConfigurationContext configurationContextFromFileSystem =
location", null);
        ServiceClient sc = new ServiceClient(configurationContextFromFileSystem, null);
        sc.engageModule(new QName("addressing"));
        OMElement res = sc.sendReceive(payload);

> using sendreceive(blocking)  it throws a nullPointerException
> -------------------------------------------------------------
>          Key: AXIS2-764
>          URL:
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: transports
>     Versions: 1.0
>  Environment: jdk 1.5.0_06
> tomcat 5.5.12
> axis2  1.0
>     Reporter: jacopo ravagnan
>     Assignee: Deepal Jayasinghe
>     Priority: Critical

> I've deployed a simple webservice with three methods.
> First one is echoElement method:
> public OMElement echoElementAll(OMElement element){
> 		element.detach();
> 		return element;
> 	}
> Second one is the same without build and detach, third one is one method that makes a
connection to database.
> Every time I'm trying to invoke one of these methods using my client with:
> OMElement ris=serviceClient.sendReceive(in);
> axis 2 throws this exception server-side:
> Exception in thread "Axis2 Task" java.lang.NullPointerException
> 	at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(
> 	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
> 	at org.apache.coyote.http11.InternalOutputBuffer.flush(
> 	at org.apache.coyote.http11.Http11Processor.action(
> 	at org.apache.coyote.Response.action(
> 	at org.apache.catalina.connector.OutputBuffer.doFlush(
> 	at org.apache.catalina.connector.OutputBuffer.flush(
> 	at org.apache.catalina.connector.CoyoteOutputStream.flush(
> 	at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(
> 	at sun.nio.cs.StreamEncoder.flush(
> 	at
> 	at
> 	at com.ctc.wstx.sw.BaseStreamWriter.flushStream(
> 	at com.ctc.wstx.sw.BaseStreamWriter.safeFlushStream(
> 	at com.ctc.wstx.sw.BaseStreamWriter.flush(
> 	at
> 	at
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
> 	at org.apache.axis2.engine.AxisEngine.send(
> 	at org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver$1.handleResult(
> 	at org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver$
> 	at$Worker.runTask(
> 	at$
> 	at
> and this Exception client-side:
> Exception in thread "main" org.apache.axis2.AxisFault: Incoming message input stream
is null
> 	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(
> 	at org.apache.axis2.client.ServiceClient.sendReceive(
> 	at org.apache.axis2.client.ServiceClient.sendReceive(
> 	at it.ibc.axis2.test.ArtDaCodClient.main(
> I think it's a timeout-problem or a serialization-problem of message. Can you fix it?
> Thank you.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

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

View raw message