0

I deployed my webapp (written with GWT and using Remote Procedure Calls (RPC)) to OpenShift. If I access my application a RPC is called. I checked the log-files and the following exception is the result:

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

Does anyone know, how to fix that? I used Maven to build my application (mvn clean install)

Braj
  • 46,415
  • 5
  • 60
  • 76
pas2al
  • 564
  • 1
  • 4
  • 15
  • Open the .war file and check if the dependency is there. – Doon Apr 13 '14 at 00:33
  • Where should it be? How would these dependencies look like? – pas2al Apr 13 '14 at 00:37
  • 1
    Read [java.lang.ClassNotFoundException: com.google.gwt.user.client.rpc.RemoteService](http://stackoverflow.com/questions/20482165/java-lang-classnotfoundexception-com-google-gwt-user-client-rpc-remoteservice) – Braj Apr 13 '14 at 00:38
  • Please share `pom.xml`. – Braj Apr 13 '14 at 00:39
  • Open as if it was a zip file (Open With > 7-Zip or whatever, on Windows). You will be able to see the .war content. Look for `RemoteService.class`. Edit: @Braj comment is the way to go. – Doon Apr 13 '14 at 00:40
  • Have you added `gwt-servlet` as dependency in your `pom.xml`? – Braj Apr 13 '14 at 00:41
  • I checked the war file, in the lib-folder is no gwt-servlet.jar. I don't have the gwt-servlet in my pom.xml. This is maybe my problem :-) – pas2al Apr 13 '14 at 00:45
  • Thats it. Simple problem. Thanks for you support :-) – pas2al Apr 13 '14 at 00:55

1 Answers1

1

Please add the dependency in your pom.xml. Replace ${gwtVersion} in below dependency.

    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-servlet</artifactId>
        <version>${gwtVersion}</version>
        <scope>runtime</scope>
    </dependency>

Again do the same step mvn clean install

Please have a look at ClassNotFoundException when deploying GWT-RPC-Applicaton

Community
  • 1
  • 1
Braj
  • 46,415
  • 5
  • 60
  • 76