Hello Arpan,
did you read my last post?
I just saw that our final build file does not contain gwt-user. The files
are all from gwt-servlet-2.12.2.jar which contains the correct jakarta
imports:
package com.google.gwt.user.server.rpc.jakarta;
...
import jakarta.servlet.ServletConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
...
public class RemoteServiceServlet extends AbstractRemoteServiceServlet ...
*>Request for Help*:
>Is there a Jakarta-compatible fork or alternative for gwt-user?
As mentioned use:
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-servlet-jakarta</artifactId>
<version>${gwt.version}</version>
</dependency>
>Has anyone succeeded in using GWT with Jakarta EE (e.g., on WildFly 33)?
Yes we have (with WF 34, now 36)
>Would shading or patching the library (e.g., with jarjar, transform
plugin, or gradle-shadow) help in this case?
You could try but I wouldn't. Correctly update/replace/exclude all
necessary dependencies. That includes gwtrpc-spring.
I checked the code of the gwtrpc-spring project and found several javax
references. So you'll need to create your own fork which uses the jakarta
version (as described in my previous post)
gwtrpc-spring\trunk\src\main\java\org\gwtrpcspring\gilead\GileadAdapterAdvice.java
line 18: import javax.annotation.PostConstruct;
gwtrpc-spring\source-archive\gwtrpc-spring\trunk\src\main\java\org\gwtrpcspring\gilead\GileadHelper.java
line 18: import javax.servlet.http.HttpSession;
gwtrpc-spring\source-archive\gwtrpc-spring\trunk\src\main\java\org\gwtrpcspring\RemoteServiceUtil.java
line 18: import javax.servlet.ServletContext;
line 19: import javax.servlet.http.HttpServletRequest;
line 20: import javax.servlet.http.HttpServletResponse;
line 21: import javax.servlet.http.HttpSession;
>Any GWT versions (or maintained forks) that already support Jakarta
namespaces?
Yes. See above.
Arpan Ameta schrieb am Donnerstag, 26. Juni 2025 um 14:26:36 UTC+2:
Hello Team,
I am working on migrating our GWT-based application to support Jakarta EE
(jakarta.*) and JDK 17. We’ve updated most dependencies and replaced
javax.* imports with jakarta.*, and are deploying the application on *WildFly
33*.
However, we're currently blocked by an issue with *GWT's gwt-user
dependency*, which still references javax.servlet.http.HttpServlet. This
causes a deployment failure, as WildFly 33 no longer supports
javax.servlet.*.
*Error from WildFly Server Log: *
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
...
WELD-001519: Not generating any bean definitions from
org.gwtrpcspring.RemoteServiceDispatcher
because of underlying class loading error: Type
javax.servlet.http.HttpServlet not found.
The root cause appears to be the gwt-user library internally depending on
javax.servlet.http.HttpServlet, which is no longer present in Jakarta EE 10
environments like WildFly 33.
*What’s Already Done:*
-
Migrated to JDK 17 and Jakarta EE 10.
-
Updated other dependencies like Atmosphere, Velocity, Commons
FileUpload, etc.
-
Replaced all direct javax.* usages with jakarta.* in our codebase.
-
Confirmed WildFly 33 is configured properly for Jakarta EE.
*Request for Help*:
-
Is there a Jakarta-compatible fork or alternative for gwt-user?
-
Has anyone succeeded in using GWT with Jakarta EE (e.g., on WildFly 33)?
-
Would shading or patching the library (e.g., with jarjar, transform
plugin, or gradle-shadow) help in this case?
-
Any GWT versions (or maintained forks) that already support Jakarta
namespaces?
Any guidance or workarounds will be greatly appreciated.
Thanks in advance,
*Arpan Ameta*
On Thursday, June 26, 2025 at 2:47:22 PM UTC+5:30 Lonzak wrote:
The relevant part:
*"Error while loading class org.gwtrpcspring.RemoteServiceDispatcher Caused
by: java.lang.NoClassDefFoundError: javax/servlet/ServletException Caused
by: java.lang.ClassNotFoundException: javax.servlet.ServletException from
[Module [...]"*
If you check the RemoteServiceDispatcher you'll see the following:
public class RemoteServiceDispatcher.java extends RemoteServiceServlet { ...
So now if you open the RemoteServiceServlet.java you'll see the following
imports:
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
It seems that you have used the non jakarta version of GWT? Or it does
additionally exist in your classpath (redundantly).
You have to use the GWT jakarta version and not the javax version. Also
make sure no dependency is loading the old version as a transitive
dependency...
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-servlet-jakarta</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
And *not*:
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
Happy analyzing :--)
Arpan Ameta schrieb am Donnerstag, 26. Juni 2025 um 10:36:06 UTC+2:
*Dear Team,*
We have completed the migration of our application code by replacing all
references from javax.* to jakarta.* to align with Jakarta EE 10 standards.
However, upon deploying the updated application to the *WildFly 33* server,
we are encountering a deployment failure. The server logs indicate a class
loading issue during deployment, specifically related to
org.gwtrpcspring.RemoteServiceDispatcher.
Please find the relevant portion of the error log below for your reference
Not generating any bean definitions from
org.gwtrpcspring.RemoteServiceDispatcher because of underlying class
loading error: Type javax.servlet.http.HttpServlet from [Module
"deployment.phoenix.war" from Service Module Loader] not found.
...
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
...
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServlet
from [Module "deployment.phoenix.war"]
It seems that despite updating our application to use jakarta.servlet.*,
some legacy classes or dependencies are still referencing
javax.servlet.http.HttpServlet, which is no longer present in the Jakarta
EE 10 runtime environment provided by WildFly 33.
We would appreciate your guidance on resolving this issue. Specifically, we
are looking for advice on:
-
Identifying and resolving any transitive dependencies still relying on
javax.servlet
-
Ensuring compatibility with WildFly 33’s Jakarta EE 10 module structure
Please let us know if further information or logs are needed.
*Thanks & Regards,*
*Arpan Ameta*
On Monday, June 16, 2025 at 1:06:28 PM UTC+5:30 Lonzak wrote:
Yes we did successfully migrate our GWT project to GWT 2.12.1 and Java17 /
Jakarta.
However we didn't use gwtrpc-spring...
First thing would be analyze whether the dependency could be thrown out. If
that is not possible then I did the following:
As you mentioned the repo ( nexus.emergya.es ) seems offline but the
original project is still online:
Binary: https://code.google.com/archive/p/gwtrpc-spring/downloads
Source: https://code.google.com/archive/p/gwtrpc-spring/source
For several old dependencies I had to create a Java17 / Jakarta version on
my own, if there was no compatible version.
https://code.google.com/archive/p/gwtrpc-spring/source/default/commits
The last changes was to mavenize the project which is a start.
So what would I do?
1) Download the source and setup a github project
2) commit the original source 1:1 (to prove your base)
3) Upgrade the project to jakarta / java 17
4) Either add or remove missing transitive dependencies (like gilead-core
...) This one could be found here:
https://github.com/lmco/eurekastreams-mvn-repo/tree/master/releases/net/sf/gilead/gilead4gwt/1.3.2
5) ...
Good luck!
Frank Hossfeld schrieb am Donnerstag, 12. Juni 2025 um 08:26:37 UTC+2:
I have stopped using RPC for years now. But I would suggest to copy the one
class >>SpringRemoteServiceServlet<< of gwtrpc-spring your project and
change the import from >>javax.servlet<< to >>jakarta.servlet<< and of
course, remove the dependency.
Arpan Ameta schrieb am Mittwoch, 11. Juni 2025 um 14:59:41 UTC+2:
We’re currently migrating our legacy project from *GWT 2.8.1 to GWT 2.12.0*
to be compatible with *JDK 17* and modern tooling. As part of this upgrade,
we’ve updated the dependency from:
<dependency>
<groupId>org.gwtrpcspring</groupId>
<artifactId>gwtrpc-spring</artifactId>
<version>1.01</version>
</dependency>
To :
<dependency>
<groupId>org.gwtrpcspring</groupId>
<artifactId>gwtrpc-spring</artifactId>
<version>1.02</version>
</dependency>
We’re facing the following challenges:
-
*Deployment fails in WildFly 33*, throwing NoClassDefFoundError for
javax.servlet.http.HttpServlet, which seems to originate from
RemoteServiceServlet in the GWT RPC stack.
-
The artifact gwtrpc-spring:1.02 isn't resolving from Maven Central, and
the old configured repo http://www.mvnsearch.org/maven2/ is *timing out*.
-
We're unsure if *gwtrpc-spring 1.02* is compatible with GWT 2.12 and
*Jakarta
EE 9+ (jakarta.servlet)* changes.
📌 *Has anyone successfully used gwtrpc-spring with GWT 2.12 and JDK 17?*
📌 Any fork or alternative for gwtrpc-spring compatible with modern GWT and
WildFly?
📌 Suggestions on resolving servlet dependencies (HttpServlet) when
deploying in WildFly 33?
Any help, pointers, or even working examples would be greatly appreciated!
🙏
Thanks in advance!
— Arpan
--
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 visit
https://groups.google.com/d/msgid/google-web-toolkit/19959aa9-f4e2-43d5-b0ef-8cce0fd8aaa4n%40googlegroups.com.