GWT-RPC and external Tomcat

40 views
Skip to first unread message

delphino

unread,
Apr 18, 2008, 4:28:00 AM4/18/08
to Google Web Toolkit
Hello everybody,

I'm just preparing for a student's research on the GWT. With that I
really have problems to get the Remote Procedure Call work.


Basically it's all about this Error-Message:

com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
This application is out of date, please click the refresh button on
your browser


The problem does NOT araise when I use the internal tomcat provided by
the GWT. But with that, I
1. cannot use JDBC/ODBC connector for MySql access
2. cannot deploy my application (even worse)

+++

First two questions to clarify:
a) does it matter if my external tomcat runs on port 8080?
e.g. my call looks like this: setServiceEntryPoint("http://localhost:
8080/servlet/RPCServiceImpl")

b) does the servlet-sourccode NEED to be in the same eclipse-project
as the client code so that they can actually SHARE a single java-
interface-file? Or is it allowed to duplicate this interface-file for
a separate tomcat-servlet-project?

+++

Back to the things I allready tried:
* testing everything with the servlet-code in the client-project and
the internal tomcat just works fine

* EVENT testing everything with a function that does not return
anything and has VOID parameters (no ones) - ALSO works with the
external tomcat!

* if I just add an integer or string to be "sent" by the
rpcproxywrapper when calling the remote procedure, the above error
occurrs

+++

- my external tomcat is up and running well (tested with GWT and AJAX
allready!! Also the MySQL Transactions worked here)



If you need to see any code, just ask for, I'll post it. But I'm
really stuck since two days now. Have tried everything, but the error
message sounds to unconcrete for me.

Please provide me with a few hints, pitfalls (e.g. some settings/
invocations?).

Thanks,
ChriZ

Srini Marreddy

unread,
Apr 18, 2008, 1:27:43 PM4/18/08
to Google Web Toolkit
This exception occurs mostly when you modify the data classes that
were shared between GWT client code and servlet( DTO's) and didn't
recompile and repackage the code. Make sure you compile everything
and deploy it to tomcat.( You can reproduce this error in hosted mode
by modifying a shared/server side class and refresh in hosted mode
without restarting the hosted browser).

-Srini Marreddy

delphino

unread,
Apr 18, 2008, 2:56:21 PM4/18/08
to Google Web Toolkit
Hi,

thanks for your advise. Actually I have a really simple (test)
interface:

package de.client;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.SerializableException;
public interface RPCService extends RemoteService {
public void RPCService(String service, String value) throws
SerializableException;
}

(for the client of course there exists an ~Async version of it)

I did not change it during deployment. I just took the (working)
classes and copied the whole de-subdirectory to the classes-directory
of tomcat, so that it can find the interfaces.

Maybe there are some weird things to pay attetion to, when "deploying"
to tomcat? (things that are just not familiar to a GWT-newbie ;-)


Thanks a lot,
ChriZ

Srini Marreddy

unread,
Apr 18, 2008, 5:03:49 PM4/18/08
to Google Web Toolkit
In your deployed Web app root folder make sure you have the *.js and
*.html files corrosponding to your module. You have to copy those from
www folder in your eclipse and place it in web app root folder if you
are not using ANT tasks for generating war file.

-Srini Marreddy

delphino

unread,
Apr 19, 2008, 5:59:55 PM4/19/08
to Google Web Toolkit
here is my setup:

The js and html files of the client part are (deployed)
(HelloWorldRPCClient.html, etc) at:
C:\Apache2\Tomcat\webapps\ROOT\de.HelloWorldRPCClient

The class of the server part (RPCServiceImpl.class) at:
C:\Apache2\Tomcat\webapps\ROOT\WEB-INF\classes\de\server

The interface classes (and client classes) (RPCService.class/
RPCServiceAsync.class/HelloWorldRPCClient.class) at:
C:\Apache2\Tomcat\webapps\ROOT\WEB-INF\classes\de\client

Web.xml at:
C:\Apache2\Tomcat\webapps\ROOT\WEB-INF
says:
<servlet>
<servlet-name>RPCServiceImpl</servlet-name>
<servlet-class>de.server.RPCServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RPCServiceImpl</servlet-name>
<url-pattern>/servlet/RPCServiceImpl</url-pattern>
</servlet-mapping>


My client calls:
target.setServiceEntryPoint("http://localhost:8080/servlet/
RPCServiceImpl");

Apache Tomcat is running on port 8080.



Could you just check this information if anything might be
misconfigured in your opinion?

Thanks very much in advance!
chris
> > > > ChriZ- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages