google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

NullPointerException in GwtRpcInvocationHandler.invoke(GwtRpcInvocationHandler.java:72) when invoking zero argument method #141

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create an RPC service with single no args method
2.Register CreateHandler that extends from RemoteServiceCreateHandler and 
creates the service.
3.Run the test that will create and call the method of the service

What is the expected output? What do you see instead?
The method successfully called. But I see:
java.lang.NullPointerException at 
com.googlecode.gwt.test.rpc.GwtRpcInvocationHandler.invoke(GwtRpcInvocationHandl
er.java:72)
    at $Proxy23.getUserMappings(Unknown Source)

What version of the product are you using? On what operating system?

0.38

Please provide any additional information below.

I believe the source of the error is here:

(46)  public Object invoke(Object proxy, Method method, Object[] args) {
(47)    Object[] subArgs = new Object[args.length - 1];
(48)    for (int i = 0; i < args.length - 1; i++) {

args can be null if you call toString() method when debugging the app

Original issue reported on code.google.com by kolun...@gmail.com on 28 Apr 2012 at 12:58

GoogleCodeExporter commented 9 years ago
Could you please provide the entire stacktrace, your RemoteServiceCreateHandler 
implementation and your deferred binding statement to create your Async object ?

Original comment by gael.laz...@gmail.com on 3 May 2012 at 6:49

GoogleCodeExporter commented 9 years ago
I don't understand how you can have a null args array since it has to contain 
your AsyncCallback reference (which cannot be null).

Could you please provide some sample ?

Original comment by gael.laz...@gmail.com on 7 May 2012 at 1:44