Friday, April 26, 2024

Re: Seeking Advice on Legacy Application Migration Strategy

GWT 2.8.2 is pretty old - nearly seven years - and i am not sure, if the GWT 2.8.2 will work with Java 11

Migrating to the latest version of GWT will give you some benefits. IIRC GWT 2.8.2 generates at least 5 JS-files where GWT 2.11.0 only generates 2. This will speed up the build. Also, there is a security issue in older GWT versions (in case you are using RPC). 

To do so, separate your code in client-, shared- and server-modules (as Craig already mentioned).  Take a look here: https://github.com/tbroyer/gwt-maven-archetypes or here https://github.com/NaluKit/gwt-maven-springboot-archetype. This should give you an idea, how your project look like after the separation. Once done, it should be possible to use different Java versions on the client and server side.

Once you have separate your code, you can update the GWT version. My first step would be to update to GWT 2.10.0. I would do this, because to GWT 2.10.0 works with the old javax stuff on the server side and give you the opportunity to patch GXT without updating the server stuff.  (IIRC you need to patch two classes). After the patch you can move to GWT 2.11.0 and Java 11 and fix the other issues by updating versions, etc.

Wejden Mrabti schrieb am Freitag, 26. April 2024 um 09:12:33 UTC+2:
thank you for your answer @craig Mitchell
if i want to continue hibernate 6 , how to do launch gwt application on java 11 ? 
is it possible to continue working like this ? what do you think?
Le vendredi 26 avril 2024 à 02:22:52 UTC+2, Craig Mitchell a écrit :
It'd be hard to answer that question, as we don't have all the details.  As this is a GWT forum, I'd say, migrate GWT to the latest version first.  But that might actually be bad advice, just depends on your project.

My gut feel is you'd be best to decouple the front end and back end first.

On Friday 26 April 2024 at 2:32:17 am UTC+10 Wejden Mrabti wrote:

Hello GWT Users Community,

I'm currently working on a large legacy application stack, using Java 8, Hibernate version 5.3.20.Final, and Hibernate Search 5.11.5.Final. Our frontend technology stack includes GWT version 2.8.2 and GXT version 2.3.1a-gwt22. Fontend and backend arent well de-coupled.

In my initial approach to modernize the application, I began by migrating Hibernate to version 6.2, assuming it would be the easiest step. However, I encountered an issue where Hibernate 6.2 requires transitioning to Jakarta Persistence. When attempting to compile parts of my codebase, I received the following error:

java.lang.UnsupportedClassVersionError: jakarta/persistence/Transient has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

This suggests that I need to execute my code with JDK 11. However, when attempting to do so, I encountered the following issue:

[ERROR] Found resouce but unrecognized URL format: 'jrt:/java.sql/javax/sql/DataSource.class' java.lang.NoClassDefFoundError: javax/sql/DataSource

After reviewing your discussions in the GWT contributors group, I'm questioning whether starting with the Hibernate migration is the right approach. Should I instead prioritize migrating Java or perhaps GWT? I would greatly appreciate your insights and advice based on your experiences.

Thank you,

WM

--
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/a91eb3fa-af37-4c37-bc61-010bbd151763n%40googlegroups.com.

No comments:

Post a Comment