Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT: RPC Failure (StatusCodeException)
    text
    copied!<p>in my project an RPC interface was implemented to communicate between GWT and a server as described here:</p> <p><a href="http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html" rel="nofollow">http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html</a></p> <p>All the existing methods can be invoked fine, but lately i introduced a new method which when calling it results in an RPC failure:</p> <pre><code>com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:192) at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl(Request.java:254) at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch(Request.java:226) at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:217) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.moz.MethodDispatch.invoke(MethodDispatch.java:80) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1428) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840) at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720) at com.google.gwt.dev.GWTShell.run(GWTShell.java:593) at com.google.gwt.dev.GWTShell.main(GWTShell.java:357) </code></pre> <p>(This excecption stacktrace is shown when running in hosted mode).</p> <p>Here's the changes I made:</p> <ol> <li><p>I extended my service interface with the new method:</p> <p>@RemoteServiceRelativePath("myservice") public interface MyService extends RemoteService { // ... Boolean isSomethingValid(String paramToCheck); }</p></li> <li><p>I implemented my method:</p> <p>public class PMyServiceImpl extends GWTSpringController implements MyService { // ...</p> <pre><code>public Boolean isSomethingValid(String paramToCheck) { // do something ... } </code></pre> <p>}</p></li> <li><p>I added the method definition to the asynchronous interface:</p> <p>public interface MyServiceAsync { // ... void isSomethingValid(String paramToCheck, AsyncCallback callback); }</p></li> </ol> <p>That's it. Am I missing anything? Any hints why the RPC failure occurs? In my server log, I can see the following exception:</p> <pre><code>[7/26/11 11:48:16:618 CEST] 0000004a WebApp A SRVE0181I: [myapplication.war] [/istoolset] [Servlet.LOG]: Exception while dispatching incoming RPC call: com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.Boolean com.ubs.istoolset.front.fet.gwt.businessmodel.client.service.MyService.isSomethingValid(java.lang.String)' threw an unexpected exception: java.lang.NullPointerException at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) at com.ubs.istoolset.gwt.framework.rpc.GWTSpringController.handleRequest(GWTSpringController.java:48) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:859) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:593) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:534) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:450) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:508) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:296) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:270) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497) Caused by: java.lang.NullPointerException at com.ubs.istoolset.front.fet.gwt.businessmodel.server.MyServiceImpl.isSomethingValid(MyServiceImpl.java:1906) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) ... 27 more </code></pre> <p>Any help is very appreciated, thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload