0
votes

For a long while we were running our GWT-based application in Eclipse using custom subclasses of com.google.gwt.core.ext.ServletContainerLauncher and com.google.gwt.dev.DevMode.

This was to allow us to run our custom (newest) Jetty and, over time, it gave us some other control, i.e. launching the server just a bit differently in Eclipse so as to allow files to be spread around Eclipse projects instead of being where they end up in production.

These were effectively displacing/reimplementing/overriding bits of JettyLauncher.java and DevMode.java

Right now I am trying to upgrade to GWT 2.7 and this no longer works. Specifically it starts with:

Started code server on port 9997
Loading modules
   com.<...>.ClientDev
      Public resources found in...
      Translatable source found in...
Starting HTTP on port 8008

All I get is that the infamous "GWT module "client" may need to be (re)compiled". I see that the Eclipse launch configuration now offers the choice between super dev mode and a "classic" one. I didn't change that yet (still at "classic") but the idea is that we need to move on to Super Dev Mode (predominantly because of speed and support, but classic features and debugging in IDE will be missed).

I tried to find documentation on what changed (or needs to be changed in code such as mine) to get over to 2.7 but failed so far. Can anyone help?

Thanks!

1
Extra note - if I just enable the super dev mode on this launch config it fails at startup. More specifically, I observed the (new) CodeServer is started on a separate thread as soon as I launch the app. When it completes going through its stuff it fails with the java.lang.NoSuchMethodError: org.eclipse.jetty.server.AbstractConnector: method <init>()V not found in the WebServer.start() methodLearner
Another update - after deleting gwt-unitCache and (GWT 2.7!) precompiled code I am able to start the old/classic dev mode. I am trying production mode / precompiled again.Learner

1 Answers

0
votes

I didn't find any documentation but I succeeded to get started. Here are the things that I had to do:

  1. I actually didn't have to change my launcher/dev mode code at all.
  2. Eclipse *.launch file had to be modified to add -nosuperDevMode argument. I could not get the super dev mode to work within it due to the conflict between its own embedded container and my newer version and I did not want to spend time solving this.
  3. Create a new way to independently launch com.google.gwt.dev.codeserver.CodeServer with the following arguments: -bindAddress [same-address-as-for-the-main-one] -port 9876 -launcherDir [war-folder-path] [GWT-module-name]
  4. Clear all the cookies. CodeServer had buffer overruns (http error 413) because I had too many cookies for it.
  5. Access the CodeServer URL directly to add the two bookmarklets (Dev Mode On, Dev mode Off) to the browser.
  6. I precompiled my app once just to make sure I have the structures but this should not be necessary, I think.
  7. Start my server first.
  8. Start the code server second.
  9. Turn dev mode on using the bookmarklet.
  10. Access my app.