2
votes

I just downloaded GWT 2.5.1 SDK. I ran:

./webAppCreator -out /home/myUser/tmp/dummygwt/ com.dummygwt.OhHai

And it created a GWT project for me. I then navigated to /home/myUser/tmp/dummygwt/ and ran:

ant -buildfile build.xml devmode

And launched the GWT Development Mode tool and I clicked Launch Default Browser which brought my "OhHai" app up in Firefox.

I then navigated to /home/myUser/tmp/dummygwt/src/com/dummygwt/server/GreetingServiceImpl.java and opened it for editing. I changed the return value on the GreetingServiceImpl#greetServer method to start with "Bonjourno," instead of "Hello,". This way, when you enter your name and click the "Send" button, the popup dialog will read "Bonjourno, ...". (I'm just playing around and having fun with this.)

I saved my changes to GreetingServiceImpl.java and then (inside GWT Dev Mode tool), navigated to the Jetty tab and clicked Restart Server and got the following warnings:

00:14:25.446 [WARN] Server class 'com.google.gwt.dev.shell.jetty.JDBCUnloader' could not be found in the web app, but was found on the system classpath

00:14:25.446 [WARN] Adding classpath entry 'file:/home/myUser/sandbox/dsi/workbench/gwt-sdk/gwt-2.5.1/gwt-dev.jar' to the web app classpath for this session More info: file:/home/myUser/sandbox/dsi/workbench/gwt-sdk/gwt-2.5.1/doc/helpInfo/webAppClassPath.html

I refreshed my browser, entered in a new name and clicked "Send". I'm still seeing "Hello, ..." instead of "Bonjourno, ...". Am I doing something wrong, or is this a bug with the GWT Dev Mode tool? Thanks in advance!

Note: If I exit the Dev Mode tool (and close the tab on my browser), and then relaunch Dev Mode, the server-side changes do take affect. But the GWT documentation clearly states that to "hot deploy" server-side code, all you need to do is restart the server from the tool...not exit it and restart the tool altogether...

3
Have you checked if your browser has the GWT Developer Plugin installed and the URL includes the param gwt.codesrv=...??futuretelematics
Thanks @futuretelematics (+1) - yes the URL that the browser opens to is http://127.0.0.1:8888/OhHai.html?gwt.codesvr=127.0.0.1:9997 however I am not sure about the GWT Developer Plugin. I was never prompted to install it so I figured it somehow auto-installed. (1) Is that not the case, and if so, how can I install it? And (2) Why would the browser plugin not being there prevent server-side code from hot-deploying? Thanks!IAmYourFaja
Hi! you need the GWT browser plugin for Mozilla in order to get the browser ask the GWT jetty server for the latest code. You can get the latest GWT browser plugin at gwt.googlesource.com/gwt-plugins If you're using other browsers than Mozilla is easier to go to gwt.google.com/missing-plugin/MissingPlugin.html (click plugins for other systems)futuretelematics
Have you started the GWT eclipse plugin embeded jetty in debug mode? (this is a stupid question but I do not see other problem) ;-)futuretelematics
Since you are the command line, have you compiled you changed code?Lavie Tobey

3 Answers

4
votes

I'm pretty sure you just need to re-compile GreetingServiceImpl.java after you've made your changes (you do not mention doing it after making changes). Restarting the server will not re-compile everything magically for you (but usually your IDE will).

Notice that hot-deploy is not the same as "hot-compile-deploy".

3
votes

When you run GWT DevMode, it will monitor only changes in client java classes.

Modify any class in any client namespace (src/com/dummygwt/client or src/com/dummygwt/shared), reload the page in the browser, and you will see the changes.

Nevertheless, when you change server side classes, you have to compile them before reloading the jetty server.

Modify a class in server side (ie GreetingServiceImpl.java) using any text editor, then run ant javac in another terminal and GreetingServiceImpl.class will be updated, finally push on the 'Restart server' button and you will see the changes.

This process is much simpler if you edit your class within Eclipse, because by default Eclipse is configured to continuously compile .java files to .class, so reloading the server is enough.

0
votes

the name is simple calls cache and for apply settigs you need to reload it. there are many way to reload, you just have to pickup the one witch is easier for you. close/open is one, you can also clean from your web browser without exiting.