java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService

会有一股神秘感。 提交于 2019-12-12 15:45:11

问题


I am getting the following exception when deploying my war file in Tomcat 6

java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService

So I tried to use just the most simplest gwt project by using webAppCreator:

The class it is trying to load is not in gwt-servlet.jar but does exist in gwt-user.jar. All places say I don't need gwt-user.jar to be deployed. This is with gwt 2.5.1. HELP!!!

used webAppCreator as follows:

webAppCreator com.mytest.TestGwtRpc

Then used the build.xml to create the war file. Deployed in Tomcat 6. started up and clicked the send button and get the following:

java.lang.NoClassDefFoundError: com/google/gwt/user/client/rpc/RemoteService

root cause

java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService


回答1:


RemoteService definitely is in gwt-servlet.jar of gwt-2.5.1.

So try unzipping your war file, and verify that gwt-servlet.jar is at

war/WEB-INF/lib/gwt-servlet.jar

I assume, that the jar is probably not there? But if it is, unzip gwt-servlet.jar, and verify that the class is at

com/google/gwt/user/client/rpc/RemoteService.class

If it's actually there, then probably something else is going on with deployment (maybe clean up tomcat's work dir, and make sure that there are no other wars deployed which could cause the error, ...)



来源:https://stackoverflow.com/questions/20482165/java-lang-classnotfoundexception-com-google-gwt-user-client-rpc-remoteservice

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!