调度传入RPC调用时发生异常java.lang.NoSuchMethodError:com.google.gwt.user.server.rpc.RPCRequest

时间:2016-01-22 15:17:49

标签: java mysql hibernate gwt rpc

我已经拥有了Hibernate和MySQL设置的GWT页面。我在SuperDev模式下运行它,这是我在编译页面后得到的错误:

var vm = this;
vm.colorHelper = colorHelper;

可能导致这种情况的原因是什么?

修改

这是我的 web.xml

 [WARN] Exception while dispatching incoming RPC call
java.lang.NoSuchMethodError: com.google.gwt.user.server.rpc.RPCRequest.<init>(Ljava/lang/reflect/Method;[Ljava/lang/Object;Lcom/google/gwt/user/server/rpc/SerializationPolicy;)V
    at com.google.gwt.user.server.rpc.RPCCopy_GWT15.decodeRequest(RPCCopy_GWT15.java:278)
    at com.google.gwt.user.server.rpc.RPCCopy.decodeRequest(RPCCopy.java:136)
    at net.sf.gilead.gwt.PersistentRemoteService.processCall(PersistentRemoteService.java:143)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Unknown Source)
[ERROR] 500 - POST /atlas_emergency_status_page/DBService (127.0.0.1) 57 bytes
   Request headers
      Host: 127.0.0.1:8888
      Connection: keep-alive
      Content-Length: 162
      X-GWT-Module-Base: http://127.0.0.1:8888/atlas_emergency_status_page/
      X-GWT-Permutation: BE75887428AD071A73976B7011B26FBF
      Origin: http://127.0.0.1:8888
      User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36
      Content-Type: text/x-gwt-rpc; charset=UTF-8
      Accept: */*
      Referer: http://127.0.0.1:8888/ATLAS_Emergency_Status_Page.html
      Accept-Encoding: gzip, deflate
      Accept-Language: en-US,en;q=0.8,fr-CH;q=0.6,fr;q=0.4,ka;q=0.2,ru;q=0.2
   Response headers
      Content-Type: text/plain

2 个答案:

答案 0 :(得分:1)

及其&#39;与您的gwt版本和您正在使用的库发生冲突。在堆栈跟踪中,您正在使用&#34; gilead&#34;和#34; hibernate4gwt&#34;的旧版本。此版本需要GWT1.5。

您应该升级这些库以与您拥有的gwt版本兼容

答案 1 :(得分:0)

如果没有看到你的web.xml和RPC类,很难说清楚

也许你在web.xml RPC servlet声明中有错误或者RPC服务没有正确实现