user3084721
user3084721

Reputation: 31

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

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

Upvotes: 3

Views: 5981

Answers (1)

Chris Lercher
Chris Lercher

Reputation: 37778

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, ...)

Upvotes: 3

Related Questions