You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "D.Kreft" <da...@kreft.net> on 2006/09/23 01:01:37 UTC

AxisFault: Reader cannot be null

I've Googled for this fault meessage as well as searched the
axis-user@ mailing list and couldn't find anything helpful.

I've got a test script that I wrote that can call methods on both my
Axis and Axis2 services (on the same host, FWIW). The Axis 1.x calls
always return results, but the Axis2 call barfs on me with the
exception cited at the bottom of this e-mail. Anyone have any ideas
what's going on here?

Here's the output from Axis 1.4:

$ ./scripts/service  --method getRequestByID --id=2
Consulting Axis (1.x) Service...
$VAR1 = bless( {
                 'versionSetName' => 'PBTest/test-1',
                 'priority' => '2',
                 'isScrubbed' => 0,
                 'isApproved' => 1,
                 'addedOn' => '2006-09-05T22:50:05.000Z',
                 'timeConflict' => undef,
                 'isOptimized' => 0,
                 'createdBy' => 'dkreft',
                 'requestEvents' => {
                                    'requestEvents' => bless( {

'requestEventID' => '1',

'addedOn' => '2006-09-22T21:57:12.000Z',

'username' => 'dkreft',

'message' => 'foobar'
                                                            }, 'RequestEvent' )
                                  },
                 'cleanupOnFailure' => 0,
                 'lastModified' => '2006-09-05T22:50:06.000Z',
                 'rebuildDependingTargets' => 0,
                 'rebuildVersionSet' => 0,
                 'requestID' => '2'
               }, 'Request' );

[I'm still trying to figure out why 'requestEvents' is coming out as
the wrong structure, but that's
a different issue.]

And here's what Axis2 does to me:

$ ./scripts/service  --axis2 --method getRequestByID --id=2
Consulting Axis2 Service...
Reader cannot be null
$VAR1 = {
          'Exception' => 'org.apache.axis2.AxisFault: Reader cannot be
null; nested exception is:
        java.lang.UnsupportedOperationException: Reader cannot be null
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
        at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:136)
        at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
        at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.UnsupportedOperationException: Reader cannot be null
        at org.apache.axis2.util.StreamWrapper.<init>(StreamWrapper.java:39)
        at org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:66)
        at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:130)
        ... 21 more
'
        };

Here's the relevant entry from my services.xml:

    <operation name="getRequestByID">
        <messageReceiver
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
    </operation>

Any help/clues would be sorely appreciated.

-dan

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AxisFault: Reader cannot be null

Posted by Davanum Srinivas <da...@gmail.com>.
i mean the server-side code and the services.xml

-- dims

On 9/22/06, Davanum Srinivas <da...@gmail.com> wrote:
> Could you please create an issue in our bug tracker with sample code
> to recreate the problem.
>
> thanks,
> dims
>
> On 9/22/06, D. Kreft <da...@kreft.net> wrote:
> > Additional info...
> >
> > This only happens when calling methods that return complex data types
> > (objects, arrays of objects). It works fine if the return type is
> > something simple (integer, primitive array of strings):
> >
> > % ./scripts/service  --method ping
> > Consulting Axis (1.x) Service...
> > $VAR1 = '1';
> >
> > % ./scripts/service  --method ping --axis2
> > Consulting Axis2 Service...
> > $VAR1 = '1';
> >
> > % ./scripts/service  --method arrayPing
> > Consulting Axis (1.x) Service...
> > $VAR1 = 'Hello';
> > $VAR2 = 'World';
> >
> > % ./scripts/service  --method arrayPing --axis2
> > Consulting Axis2 Service...
> > $VAR1 = 'Hello';
> > $VAR2 = 'World';
> >
> > I'm getting the feeling I'm missing just some tiny bit of metadata foo...
> >
> > -dan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AxisFault: Reader cannot be null

Posted by Davanum Srinivas <da...@gmail.com>.
Could you please create an issue in our bug tracker with sample code
to recreate the problem.

thanks,
dims

On 9/22/06, D. Kreft <da...@kreft.net> wrote:
> Additional info...
>
> This only happens when calling methods that return complex data types
> (objects, arrays of objects). It works fine if the return type is
> something simple (integer, primitive array of strings):
>
> % ./scripts/service  --method ping
> Consulting Axis (1.x) Service...
> $VAR1 = '1';
>
> % ./scripts/service  --method ping --axis2
> Consulting Axis2 Service...
> $VAR1 = '1';
>
> % ./scripts/service  --method arrayPing
> Consulting Axis (1.x) Service...
> $VAR1 = 'Hello';
> $VAR2 = 'World';
>
> % ./scripts/service  --method arrayPing --axis2
> Consulting Axis2 Service...
> $VAR1 = 'Hello';
> $VAR2 = 'World';
>
> I'm getting the feeling I'm missing just some tiny bit of metadata foo...
>
> -dan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: AxisFault: Reader cannot be null

Posted by "D.Kreft" <da...@kreft.net>.
Additional info...

This only happens when calling methods that return complex data types
(objects, arrays of objects). It works fine if the return type is
something simple (integer, primitive array of strings):

% ./scripts/service  --method ping
Consulting Axis (1.x) Service...
$VAR1 = '1';

% ./scripts/service  --method ping --axis2
Consulting Axis2 Service...
$VAR1 = '1';

% ./scripts/service  --method arrayPing
Consulting Axis (1.x) Service...
$VAR1 = 'Hello';
$VAR2 = 'World';

% ./scripts/service  --method arrayPing --axis2
Consulting Axis2 Service...
$VAR1 = 'Hello';
$VAR2 = 'World';

I'm getting the feeling I'm missing just some tiny bit of metadata foo...

-dan

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org