Tuesday, September 21, 2010

GPE not refreshing xxxx.gwt.rpc in dev mode on linux / tomcat

Hello,

I have a problem since a while and I am not sure about the source of the problem. I will use the sample application to explain it here (I will call my project gwt_tmp):

1 - I create a default gwt sample project with GPE.
2 - I start a debug session with the default Jetty Dev Mode.
 A - I run application in my browser in dev mode, it loads corretly.
 B - In the sample application, I enter an user name and click the button that will execute an RPC call to the server
 C - GPE (I suppose) detects that a call is done to an RPC service, and generates the XXXX.gwt.rpc policy file.
 D - I receive a response, all is fine.

Perfect! Now, I stop the server and clean the generated directory under war/gwt_tmp to be sure to start from a clean environment.

I want to execute the same process but with tomcat instead of Jetty to reflect my real production environment:
I update some configurations files to add a web tool nature to my project :

1 - I add a new nature to my .project under eclipse :
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>

2 - I creates associated settings files :
* /gwt_tmp/.settings/org.eclipse.wst.common.component
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="gwt_tmp">
        <wb-resource deploy-path="/" source-path="war"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
        <property name="java-output-path"/>
        <property name="context-root" value="gwt_tmp"/>
    </wb-module>
</project-modules>

* /gwt_tmp/.settings/org.eclipse.wst.common.project.facet.core.xml
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="jst.web"/>
  <fixed facet="jst.java"/>
  <installed facet="jst.java" version="6.0"/>
  <installed facet="jst.web" version="2.5"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

3 - I update my gwt application launcher to not run in server mode (since tomcat will be the server).
4 - I start the dev mode of the application, and I start tomcat.
 A - I run application in my browser in dev mode, it loads corretly (but on port 8080 for tomcat instead of 8888 for jetty)
 B - In the sample application, I enter an user name and click the button that will execute an RPC call to the server
 C - GPE (I suppose) detects that a call is done to an RPC service, and generates the XXXX.gwt.rpc policy file.
 D - Here is the problem ! Tomcat does not seams to realize that a new file has been generated on disk. the log says :
INFO: greetServlet: ERROR: The serialization policy file '/gwt_tmp/1CC4B1A5D8B73AD7482A23834A893A1B.gwt.rpc' was not found; did you forget to include it in this deployment?
GRAVE: greetServlet: WARNING: Failed to get the SerializationPolicy '1CC4B1A5D8B73AD7482A23834A893A1B' for module 'http://127.0.0.1:8080/gwt_tmp/gwt_tmp/'; a legacy, 1.3.3 compatible, serialization policy will be used.  You may experience SerializationExceptions as a result.
 If i refresh my workspace and I restart tomcat, it reload correctly the previously generated .rpc file and I no longer get this error.

I tried to activate the auto refresh of worspace file in my eclipse configuration, but it did not resolved this.
I know that the worspace auto refresh is not implemented in the same way between windows and linux (https://bugs.eclipse.org/bugs/show_bug.cgi?id=108697)
Since gpe sources are not available, I wanted to be sure that GPE developers have requested a workspace localRefresh on XXX.gwt.rpc generated file (http://wiki.eclipse.org/FAQ_When_should_I_use_refreshLocal%3F)

I might be completly wrong about this, but I have no other idea.

Maybe someone has already met this problem and found a solution ?

Thanks,

Nicolas ANTONIAZZI

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment