For whatever it might be worth... I just went through a possibly similar exercise, getting my 2.11 GWT-RPC-based app to run with Tomcat 10. I had to run around my codebase and replace 'javax' with 'jakarta', but the last key step was ensuring that my GWTRPC services inherited from this class: com.google.gwt.user.server.rpc.*jakarta*.RemoteServiceServlet
Note the .jakarta. in there, which otherwise is not present (in javax form) in the older/other class hierarchy -- a different package entirely. Also note, my project is not using 'validation-api.jar' directly (not sure about indirectly), so I can't promise the above will help -- sorry. On Wednesday, March 20, 2024 at 5:45:24 AM UTC-4 Priya wrote: > Hi Team, > > We are working on development environment with Tomcat 10 where third party > jar *jakarta.validation-api.jar *has been updated to tomcat specific > version where package structure is changed from javax.validation to > jakarta.validation. > > When GWT 2.11 with tomcat specific jars(Gwt-servlet and > requestfactory-server.jar) are deployed, it is trying to find > javax.validation.Path with below stack trace- > > Exception while dispatching incoming RPC call > java.lang.NoClassDefFoundError: javax/validation/Path > java.base/java.lang.Class.forName(Class.java:467) > at > com.google.gwt.user.server.rpc.SerializationPolicyLoader.loadFromStream(SerializationPolicyLoader.java:217) > at > com.google.gwt.user.server.rpc.jakarta.RemoteServiceServlet.loadSerializationPolicy(RemoteServiceServlet.java:98) > at > com.google.gwt.user.server.rpc.jakarta.RemoteServiceServlet.doGetSerializationPolicy(RemoteServiceServlet.java:437) > at > com.google.gwt.user.server.rpc.jakarta.RemoteServiceServlet.getSerializationPolicy(RemoteServiceServlet.java:251) > at > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader.java:505) > at com.google.gwt.user.server.rpc.jakarta.RPC.decodeRequest(RPC.java:241) > > As this package has been changed in our environment to > jakarta.validation.path, GWT source code is unable to find this class, > giving NoClassDefFoundError. > > Also we can find several references of javax.validation.Path in gwt-user > and other jars under GWT 2.11 jars. > > My queries are - > 1. Has anyone come across such error, if yes, what is workaround. > 2. as javax packages are outdated and replaced by jakarta, is there a plan > to update them and what is significance of those classes .Also, how this > failure can be addressed. > 3. One solution I could see for older releases, is to add dependency for > gwt-servlet-deps.jar, but that is not viable solution to us,as we are > moving away from javax packages due to tomcat upgrade. > > Any immediate help will be appreciated. > Thanks! > -- 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/f9db97be-397f-4bfe-a13a-de001fdcd311n%40googlegroups.com.
