Request Builder Error - GWT

686 views
Skip to first unread message

coffeMan

unread,
Oct 6, 2011, 7:32:03 AM10/6/11
to Google Web Toolkit
Can anyone tell me what the error might be coming from? I cannot get
passed this, Thanks!

[WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
com.mymaps.client.dataService.getData(java.lang.String)' threw an
unexpected exception: java.lang.UnsatisfiedLinkError:
com.google.gwt.http.client.URL.encodeImpl(Ljava/lang/String;)Ljava/
lang/String;
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
385)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
588)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
362)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at
org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:
49)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
505)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.UnsatisfiedLinkError:
com.google.gwt.http.client.URL.encodeImpl(Ljava/lang/String;)Ljava/
lang/String;
at com.google.gwt.http.client.URL.encodeImpl(Native Method)
at com.google.gwt.http.client.URL.encode(URL.java:155)
at com.mymaps.server.dataServiceImpl.getData(dataServiceImpl.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
569)

Thomas Broyer

unread,
Oct 6, 2011, 8:06:39 AM10/6/11
to google-we...@googlegroups.com


On Thursday, October 6, 2011 1:32:03 PM UTC+2, coffeMan wrote:
Can anyone tell me what the error might be coming from? I cannot get
passed this, Thanks!

 [WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
com.mymaps.client.dataService.getData(java.lang.String)' threw an
unexpected exception: java.lang.UnsatisfiedLinkError:
com.google.gwt.http.client.URL.encodeImpl(Ljava/lang/String;)Ljava/
lang/String;
[...]
Caused by: java.lang.UnsatisfiedLinkError:
com.google.gwt.http.client.URL.encodeImpl(Ljava/lang/String;)Ljava/
lang/String;
at com.google.gwt.http.client.URL.encodeImpl(Native Method)
at com.google.gwt.http.client.URL.encode(URL.java:155)


You're calling com.google.gwt.http.client.URL.encode() on the server.

The exact cause of the error is that URL.encodeImpl is a JSNI method, and JSNI is kind of a "hack" in that it uses the syntax for native methods (methods provided at runtime by native libraries –DLLs or equivalent–) followed by a Java comment with a specific "syntax". Java, on the server side, just sees a native method, so it tries to resolve it from a native library, and it fails to find the "link" to that library (hence UnsatifiedLinkError).

You should use java.net.URLEncoder or, e.g., URIUtils from Apache HttpClient.
Reply all
Reply to author
Forward
0 new messages