java.lang.ClassNotFoundException:com.google.gwt.user.client.rpc.RemoteService [英] java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService
问题描述
在Tomcat 6中部署我的war文件时,出现以下异常:
java.lang.ClassNotFoundException:com.google.gwt.user.client.rpc。 RemoteService
所以我尝试着使用webAppCreator来使用最简单的gwt项目:
它是类尝试加载不在gwt-servlet.jar中,但存在于gwt-user.jar中。所有地方都说我不需要gwt-user.jar来部署。这是gwt 2.5.1。帮帮我!!!
使用webAppCreator如下:
webAppCreator com.mytest.TestGwtRpc
然后使用build.xml创建war文件。在Tomcat中部署6.启动并单击发送按钮并获得以下内容:
java.lang.NoClassDefFoundError:com / google / gwt / user / client / rpc / RemoteService
根本原因
java.lang.ClassNotFoundException:com.google.gwt.user.client.rpc .RemoteService
RemoteService绝对位于 gwt-servlet.jar
of gwt-2.5.1。
因此,请尝试解压缩您的war文件,并验证gwt-servlet.jar位于
war / WEB-INF / lib / gwt-servlet.jar
我认为,这个罐子可能不在那里?但是,如果是这样,请解压缩gwt-servlet.jar,然后验证该类是否在
com / google / gwt / user /client/rpc/RemoteService.class
如果它确实存在,那么可能还有其他事情正在进行部署(也许清理tomcat的工作目录,并确保没有其他战争部署可能导致错误,......)
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
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, ...)
这篇关于java.lang.ClassNotFoundException:com.google.gwt.user.client.rpc.RemoteService的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!