File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes GWT and the fly likes java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService" Watch "java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService" New topic
Author

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

Sam Squamch
Greenhorn

Joined: Dec 09, 2013
Posts: 1
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
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
java.lang.ClassLoader.defineClass(ClassLoader.java:621)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
java.lang.ClassLoader.defineClass(ClassLoader.java:621)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:695)
root cause

java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
java.lang.ClassLoader.defineClass(ClassLoader.java:621)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
java.lang.ClassLoader.defineClass(ClassLoader.java:621)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:695)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42950
    
  70
I'm not familiar with webAppCreator (the one GWT app I work on has a Maven build), but what happens if you simply add that jar file to your web app? Does it work?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService