Friday, June 14, 2024

Re: GWT, Java 17, jakarta.servlet, Eclipse, GWT plugin

@Colin, thanks for getting back to me on this.  I couldn't reply right away because my wife was getting cataract surgery; it's not that this wasn't important.

> If you mean a particular plugin that you use with GWT...
I'm using the Eclipse GWT 4.0.0 plugin you guys recently completed (using the updated build, to fix the "support Eclipse 2024-03" issue; thanks for that).  I think in your lingo I therefore mean the dev mode app server.  I might look into that myself to get jetty-12 implemented, but for now I've abandoned jumping to jakarta as "a bridge too far" and am trying to solve my issues another way (likely by grumbling, rolling up my sleeves, and refactoring the mess the way it should have been done to start with, and the way I would have demanded had I worked here when it was first bungled).

> If using maven... [I'm not]... If not, please give us more detail about what you are using (or intend to use).
After further investigation, much of my issues around this seem to be that the. appropriate java command to run the web app (or Jetty itself) is not being assembled correctly by either Eclipse, the GWT plugin, or both.  There are various options that are needed and are not properly set.  That said, even if I do/can get that working, I don't think that's the right approach.  As you're going to deprecate the embedded Jetty server, I should do whatever is needed there to run my own external server(s).  That's what's unclear to me.  There are ancient references to it in the documentation at, but I'm unclear on what is really needed.  Do I need to set up and run a code server with my own Jetty or Tomcat local installation?  If so, how is that set up?  Or do I need to run my own app server (again, either Jetty or Tomcat).  The web app setup is obvious (I think... or are there special runtime parameters to direct it to the proper code server port?).  Forgive my ignorance on this, but if this is the path forward for GWT in general, I'd really like to see some clear documentation on how to set this up or at least what it is going to look like (in general, no specifics, obviously it should involve thinking and work on my part). Last note: I am assuming the code server will be easier to get working with Java 17 modules because it will (in my case) have less jar dependencies, as it only needs them for shared and client code.  That said... I might need to run both externally to get it all sorted out.  Again, my own thinking on this isn't that clear because I'm not in the weeds enough on what the plugin is really doing and how things work under the hood.

To give a shorter, more direct answer: I want to develop code in Eclipse in Java 17, and be able to run the code server and web app any way possible, so that GWT code compiles/recompiles as needed, and the web app can be accessed in the browser, and I can do iterative test-code-test-code development on a daily basis.

> GWT doesn't have a BuildException class
This was my bad.  When I got the conflict I assumed it was something in gwt-dev.jar related to GWT, but upon further investigation (unpacking the jar), I see that the conflict is caused because the ant BuildException.class file is embedded in the get-dev.jar (and possibly because the package/path is com/google/gwt/thirdparty/apache/ant/BuildException.class rather than Ant's org/apache/tools/ant/BuildException.class.  A recurring problem in upgrading to Java 17 comes from class name/version exceptions that are now verboten.  My current solution of getting Ant out of this project will have to do (as it's better architecture anyway, and should have been done by my predecessors on day 1, i.e., don't bundle custom Java ant tasks with the application code).
On Wednesday, June 12, 2024 at 12:14:48 PM UTC-4 Colin Alworth wrote:
> Clearly the GWT plugin/installed Jetty are not Jakarta-ready.  I could try to update and rebuild the plugin to make it so (maybe), but I'm so overwhelmed with other chores that I can't afford having that turn into another rabbit hole.  It's easier/safer/wiser to go back to javax.
If you mean the dev mode app server, there is no plan to do that _in gwt itself_, but there is an extension point in GWT that would let you do it yourself. Someone else has been thinking about building a small ecosystem around this in the issue tracker, but I haven't seen any movement here - see the discussion at We could easily have a jetty-12 impl, letting you run either jakarta or javax servlets, or switch to other servlet containers, and control as much or as little of the setup as you want.
If you mean a particular plugin that you use with GWT, there are so many possible plugins out there, we can't guess which one isn't working for you. Most should be able to let you run your own external server though, or specify your own server using the -server argument (and implement it yourself, as linked/discussed above).

> MEDIUM ASK: Can anyone point me to better documentation or a tutorial or a how-I-did-it-blog post on getting that set up?  Like I said, I can figure it out, I'm sure, but I'd rather do it the quick/easy/no-wasted-time way.
If using maven, check out the modular-webapp archetype for a very light example, at If not, please give us more detail about what you are using (or intend to use).

> SMALL ASK: Could GWT rename its BuildException class to GwtBuildException, to better support the twilight world of leaving Java 8 without entirely moving to modules?
GWT doesn't have a BuildException class - can you give the fully qualified class name of the type that is irritating you? I see that Ant has such a class, and Gradle too, might you be thinking of one of those?

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment