-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new release artifact for jakarta.servlet support #9845
Add a new release artifact for jakarta.servlet support #9845
Conversation
This is a draft patch to add support for Jakarta. It is assumed to only be used for modular projects, where client and server do not live in the same classpath. Among other things, this means that validation does not need to be updated, and old javax.servlet references can be left in gwt-dev and gwt-user. This does not correct the sources for deployment to maven, nor does it fix javadoc. This does not update the requestfactory-server jar. Draft for gwtproject#9727
One removes an out of date jar, the other is duplicated elsewhere on the classpath (from gwt-dev)
This is a draft patch to add support for Jakarta. It is assumed to only be used for modular projects, where client and server do not live in the same classpath. Among other things, this means that validation does not need to be updated, and old javax.servlet references can be left in gwt-dev and gwt-user. This does not correct the sources for deployment to maven, nor does it fix javadoc. This does not update the requestfactory-server jar. Draft for gwtproject#9727
One removes an out of date jar, the other is duplicated elsewhere on the classpath (from gwt-dev)
…classes to own package for source jar
…classes to own package for source jar
…into 9727-jakarta-javadoc-tweaks-test
user/src/com/google/gwt/user/server/rpc/impl/ServerSerializationStreamReader.java
Outdated
Show resolved
Hide resolved
@@ -121,9 +121,7 @@ | |||
"> | |||
<src path="super/com/google/gwt/emul/javaemul/internal" /> | |||
<classpath> | |||
<pathelement location="${gwt.tools.lib}/gss/2015-10-07/closure-stylesheets-library-20151007-rebased.jar"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't have still been here to begin with, but should probably land separately (ditto the tomcat line below).
<zipfileset src="${gwt.tools.lib}/jscomp/20160315/sourcemap-rebased.jar" /> | ||
<zipfileset src="${gwt.tools.lib}/json/android-sdk-19.1/json-android-rebased.jar" /> | ||
<zipfileset src="${gwt.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar" /> | ||
<zipfileset src="${gwt.tools.lib}/protobuf/protobuf-2.5.0/protobuf-java-rebased-2.5.0.jar" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if #9785 lands, this will need the same change.
doc/build.xml
Outdated
@@ -92,6 +110,9 @@ | |||
<arg value="-Xdoclint:none" /> | |||
<classpath refid="USER_CLASS_PATH" /> | |||
<sourcepath refid="USER_SOURCE_PATH" /> | |||
<fileset dir="${project.build}/javadoc-src"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the unified approach to sources, this must be removed.
maven/lib-gwt.sh
Outdated
[ -d $GWT_EXTRACT_DIR/doc/javadoc ] && jar cf $JAVADOC_FILE_PATH -C $GWT_EXTRACT_DIR/doc/javadoc . | ||
|
||
JAVADOC_JAKARTA_FILE_PATH=$RANDOM_DIR/gwt-jakarta-javadoc.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should no longer be required
Hello Everyone, We are using GWT 2.10 version and want to upgrade tomcat to new version Tomcat10. But as mentioned above, GWT jars are not compatible to use as is due to package structure change in Tomcat. I have three queries -
|
Only gwt-servlet.jar has a modified version at this time, and there is no plan for gwt-user.jar have a jakarta variant. This branch is missing the changes required to produce the required requestfactory-server.jar, but I think that is the main missing piece to be able to merge this. This is at the top of the remaining "TODO" list in the description of the PR.
Once this patch is complete and tested it will be merge. Presently no one is working on it, so there isn't a timeline for this. A month ago I would have said that this would definitely make the 2.11.0 release, but given that it seems no one is interested any longer, I'm not confident in that any more. I've been out for a few weeks for personal reasons, and am hoping to finalize any other patches that intend to make the release so we can get this out the door - if you (or someone else) is interested in pushing this forward, please contact me here/on gitter/via email.
Its worth a try, but the output won't be exactly compatible with what this patch tries to achieve. That is, instead of changing classes in-place, this patch copies classes to a new package and changes them there. This serves several purposes: the imports are clear (so that having the wrong imports or wrong classpath will produce clear errors instead of confusing runtime problems), and the documentation is clear ("use this package for old servlets, use that package for jakarta"). I don't think that is necessarily a problem, since you could continue to run that same tool with future versions of GWT, and just skip the jakarta-specific artifacts, but if the above concerns seems like they could cause a future headache for you, it might make sense to get this patch finished as-is. Note that we didn't try to use such a tool to make the changes in this PR, but just a few custom copy/filter operations in ant xml to specifically make new classes with the desired changes. |
Hello folks, We use GWT and will need it to work in JBoss EAP 8.0, which uses Jakarta EE 10. Has there been any further progress? Excellent platform, by the way! Many thanks. |
I've just finished a few hours of work to get the remaining development/doc tasks finished - basic tests suggest that it works, but more in depth testing by projects already using jakarta-servlet is required. If you are using gwt-servlet, please try the gwt-servlet-jakarta jar, if you are using requestfactory-server please try the requestfactory-server-jakarta jar. One important tradeoff to avoid adding requiring client-specific jars also change is to not support the Javadoc is updated for review at https://www.colinalworth.com/gwt-javadoc-jakarta/javadoc/ Maven repo server has a new snapshot, use repo https://repo.vertispan.com/gwt-snapshot/ and version Please note that this is probably the last "big" change that is waiting for review before 2.11 ships - don't assume someone else will test so we can land this. If it is important to you to see this shipped without waiting for 2.12, please help us by testing it promptly. |
I've tested the latest snapshot (20230928) of The only jakarta class I'm using is |
Many thanks niloc132 and ajkyffin: this is very much appreciated! |
@ajkyffin can you confirm if your use case would support using requestfactory-server-jakarta.jar instead, and if so, could you try using that simpler jar to ensure that this works as well? |
@niloc132 I may be able to to convert it to use RequestFactory instead of RPC. It looks like AutoBeans could do most of the work for me. It would be a few weeks before I have the time to do it tho. |
@ajkyffin my apologies, I misread (and I've been doing that more than a little lately... might be time for a break). If you're using RPC and not RequestFactory (as I thought it said on my first read), it isn't worth the effort of you updating to change both that and your classpath. |
Started migrating a very large application to Jakarta EE with WildFly and Tomcat support. Looks promising so far. We also needed to migrate vom Jetty-based dev mode to standalone Tomcat (-noserver). Good job up to here. Next step for us is to experiment with javax.validation migration. Maybe we give gwt-bean-validators a try. |
I've migrated our web application to Jakarta EE 10, and with the 28 Sep 2023 GWT Jakarta server JAR for our GWT-RPC servlets it's all behaving great! Super DevMode works great, too! Thanks very much all! |
Thanks for the feedback everyone - I think we're reasonably confident that gwt-servlet is behaving, at least for GWT-RPC use cases. Two testing questions from production apps:
|
@niloc132: I was also able to test the StackTraceDeobfuscator with the following setup in app gwt.xml and by using the GWT compilation option Here comes an example server side stacktrace received from the client:
Looks good to me. |
This dependency is needed for gwtproject/gwt#9845
Last time I tested the requestfactory jars where not ready for jakarta, but I can see from the changes in the PR that this should have changed. While I also can't currently test those new jars, I at least can confirm, that back then requestfactory with the gwt-servlet.jar with the jakarta classes did work for me. When things go well, I think I get to the point of working on/testing the gwt changes again in about 2 weeks. But thats sadly nothing I would bet on. As long there are no other voices, maybe onsider this "ready" as soon as you think and prepare for a 2.11.1 release with fixes if anyone encounters issues. |
Our migration test was with servlet-api 6.0 Jars in classpath and WildFly 29 |
Thanks very much for all your work on this! I've seen 2.11.0 has been released - brilliant! |
Draft PR to bring together changes, make a single easier-to-find place to discuss.
Some past discussion can be found at niloc132#3.
Pending work:
gwt-servlet-jakarta
's sources is missing generated .java files for the new jakarta packages. This is noted in the TODO added tomaven/lib-gwt.sh
package-info.java
files should be added to each newly created package manually, explaining that the sources are generated, and not available in the main artifacts, only in gwt-servlet-jakarta..github/workflows/*-check.yml
.Testing notes:
Fixes #9727