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.
That still does not solve my larger problem of getting the web app to run... but it seems that must be unrelated to which servlet-api I use, so again, goodbye Jakarta-servlet.
I think I recognized it myself, but the advice to move to away from the embedded Jetty seems unavoidable, as it is deprecated. It's just so darn convenient. I also have never found clear examples on how to set to that up, what the pitfalls may be, how it will work, etc. I'm sure I can figure it out... it's just not something I want to diverge into doing (but it seems at this point I must).
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.
The suggestion of breaking GWT into separate projects has some merit, as part of my entire problem is that, as I said in my intro, I am dealing with a massive, monolithic project that tries to do everything alll in one package. In general, it would be wise to refactor that into multiple projects (not only around GWT, but other things like the build process, report generation, image generation, the Swing desktop app, and other facets). Sadly, everything is so intertwined, and there is so much code, that doing so will be a massive effort, and this is just one of many high-pressure/short-timeframe projects on my plate, so I'm going to need to find the best/least-effort path in refactoring to make things work (with a longer-term project of continually refactoring things out).
I may consider falling back to an earlier version of Java, maybe 11, but I'm unsure if that will help.
I may also be having the problem because to solve many of my dependency conflicts I created a module-info.java file for my project. I don't actually need to treat it as a module, except that the side effects of using "requires" within the module-info file solve those conflicts, and I can't otherwise solve the problem that, for example, GWT and Ant both define a BuildException class (among other myriad name conflicts). But again... that problem can be at least sometimes solved by breaking the code up where conflicts occur (which again is off the time to due time/effort/budget conflicts). Moving all of the GWT code to one project, or to three (client/shared/server), and the build code (Ant tasks) to another, and other code to other places, could help...
An alternate option might be to rewrite the entire build process to use Maven or Gradle (many other, newer, smaller projects here use Gradle), but again... that's a massive detour that I'll take if I must, but it seems possible that this upgrade effort will wind up getting shelved before I have time to do that.
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?
Anyway, thanks for all the helpful input. The main points of "don't use jakarta yet", "abandon embedded Jetty", and "refactor your disastrously monolithic kaiju into something realistic" all help.
That said... I'd still like to at least have a better understanding as to why I get "Error occurred during initialization of boot layer", "java.lang.module.FindException: Module gwt.user not found, required by com.xxxxx.myapp" when the GWT container is in the class path, as well as if I explicitly add the gwt-user.jar to the path in the Run Configuration or into WEB-INF/lib (like get-servlet.jar).
On Wednesday, June 12, 2024 at 5:54:58 AM UTC-4 Thomas Broyer wrote:
On Wednesday, June 12, 2024 at 11:27:27 AM UTC+2 Jens wrote:Needless to say that I have split client, shared and server code into their own projects. This is the recommeneded project layout these days* checks notes *I've been advocating for it for more than 12 years now, and had been using it for nearly 2 years already at the time. Java 8 would be released more than 2 years later.(and note that this is –in terms of filesystem layouts– mostly due to how build tools like Maven and Gradle work, also IDEs if you want smooth integrations –although I'm sure IntelliJ IDEA could adapt to many layouts–; this can be entirely different with Ant or Make, and definitely is different with tools like Bazel/Buck/Pants/etc. Anyway the crux is to understand what you're doing, and why you're doing it, which means understanding how things work: classpaths, build classpaths, GWT Compiler, GWT DevMode/CodeServer, build tools, IDEs, etc.)
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 google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/4b462aa4-a52d-41e9-afc2-347a6346d831n%40googlegroups.com.
No comments:
Post a Comment