我开始在 OS X 10.5.8 上使用 Eclipse 插件使用最新的 Google Web Toolkit。到目前为止,我已经能够让客户端启动并运行,这很棒。
但是,服务器是另一回事。我正在尝试链接到一个 .jar 文件,该文件有一些我想在服务器 ServiceImpl 类中使用的类,但它似乎已经融入了 .jar 的先前迭代 - 我添加了一个方法,重建了 jar ,从 GWT 项目的构建路径(以及导出)上的库选项卡中删除 jar 并重新包含该 jar。没有运气 - 我仍然得到:
[WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract org.gwtapplication.client.LWDocument org.gwtapplication.client.DocumentService.getDocument()' threw an unexpected exception: java.lang.NoSuchMethodError: org.externalmodel.MyReallyValidClass.toSomething()Ljava/lang/String;
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:378)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:581)
...
Caused by: java.lang.NoSuchMethodError: org.externalmodel.MyReallyValidClass.toSomething()Ljava/lang/String;
at org.application.server.DocumentServiceImpl.getDocument(DocumentServiceImpl.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Eclipse 的代码感知在解析 MyReallyValidClass.toSomething() 调用时没有问题,并且对 externalmodel 类的其他调用也没有错误。任何线索我应该在哪里寻找?