I would recommend creating a new project with everything that you want to use, get it working how you like, then use that as a template on how you will upgrade your existing project.
For my project that I needed to upgrade from Java 8 to Java 17 (because Google App Engine dropped support for Java 8). I decided I would go "all-in" and get it onto the latest of everything. So I needed to switch to use Maven, switch to use a client/server/shared structure, switch to use my own server (I went with Undertow), and switch to use Jakarta. I also decided to go with Spring Boot (as Google App Engine had examples for that), so I used https://github.com/NaluKit/gwt-maven-springboot-archetype to create a sample project, and used that as a guide on how to upgrade my existing project. Oh, and I also switched from Eclipse to IntelliJ. It was a big job and a lot of work, but now everything is running beautifully, so worth it in the long run. On Wednesday 12 June 2024 at 8:01:47 am UTC+10 Bob Lacatena wrote: > I am wrestling with a massive effort that has been one stumbling block > after another. The core task is to convert a sadly monolithic and archaic > app from Java 8 to Java 17. > > My current subtask (maybe necessary, maybe not) is to convert everything > to use jakarta.servlet rather than javax.servlet, but when I try to declare > an import of com.google.gwt.user.server.rpc.jakarta.RemoteServiceServlet, > Eclipse just keeps replacing it with the "original" (non-jakarta) path. > > I was hoping I could solve this by renaming the gwt-servlet-jakarta.jar > file as gwt-servlet.jar, and putting that in war/WEB-INF/lib, but it > doesn't change the Eclipse behavior, AND it originally generated an error > that the size of that jar did not match the SDK... but after a clean-build > that problem (at least) went away. > > But my underlying problem is that I have classes that need to extend the > RemoteServiceServlet, and access the associated ServletContext, > HttpServletRequest, SerializationException and other classes that must all > be the jakarta (not javax) versions. > > I can go back to using javax (and I'm not at all certain that the Eclipse > embedded Jatty server will use jakarta instead of javax, so maybe jakarta > won't work locally anyway)... but then I have to solve a problem where GWT > dev mode (with javax) gives me: > > Error occurred during initialization of boot layer > java.lang.module.FindException: Module gwt.user not found, required by > com.xxxxx.myapp > > Or do I have to move into a world where I stop using the so-convenient > embedded Jetty and deploy to and run an external server? > > Any advice on what to do (or, preferably, a deeper understanding of what > is happening) would be greatly appreciated. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/2626e1c6-7ced-4460-901f-34a922e18cc3n%40googlegroups.com.
