Thursday, February 18, 2021

Re: How to start with GWT upgrade from version 2.1.0 to 2.9.0, (java 1.6 to java 1.8)

So i am give a try at upgrading my app from GWT 2.1.0 to GWT 2.9 and from gxt 2.2.1a to gxt 2.3.1a.jar  ( Actually to be exact gxt 2.3.1a-gwt22.jar) as per suggestion from  @Blaze, 
with these in place gwt compilation complained about some of the gxt methods being not available, and it was easy to fix the method names by referring to gxt 2.X release notes. However i am stuck with an of the error from ListView class, and the error cascades to all my classes using ListView widget, below is the error causing the issue

Error:
[Error]  Error in 'com/extjs/gxt/ui/client/widget/ListView.java' 
[Error]  Line 816: Type mismatch: cannot convert from Node to Element

could you please help me with the types of problems which you had faces using gxt 2.2.1a, and approximately how may fixes would require in gxt jar.

Thanks you

On Wednesday, August 26, 2020 at 11:53:57 PM UTC+5:30 Blaze wrote:
If its ok for you to stay with GXT2, then just use gxt 2.3.1a.jar which usually should work out of the box also with 2.8 and 2.9. 
For me(fairly complex project) with 2.8 and 2.9 I had some minor problems which I change my self directly inside the source and recompiled the jar.

Hope this helps!

p.s moving to gxt3 or gxt4 would be a lot of rewrite!!

On Tuesday, August 25, 2020 at 6:24:15 PM UTC+2 t.br...@gmail.com wrote:


On Tuesday, August 25, 2020 at 5:49:38 PM UTC+2, Hari wrote:
Thank you all for the quick response, from all the responses its general that it will not be complete re-write, which is a relief for sure. 

Also I forgot to mention we were using GXT 2.2.1 and as per this doc https://docs.sencha.com/gxt/4.x/guides/getting_started/Versions.html in order to use GWT 2.9 i will have to use GXT4.x, so i made the SDK changes and tried to build the application, with minimal changes to *.GWT.xml file, i am running into below build error.

Updating GXT is another matter, AFAICT this is not easy, as they made a lot of breaking changes. Also, it's likely that the app will change visually. Oh, and licensing.
(I've never used GXT, so can't really help)

But if your goal is only/primarily to update to Java 8, have you tried whether it's possible without bumping GWT at all? or possibly not all the way to 2.8/2.9? (e.g. 2.6, which is still compatible with GXT 2, as of 2.3.1a)
 

[java]    [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')

Googling around on this error for some time now, but no luck. can anyone here please help me with this.
Also are there any other things that need to be taken care of when upgrading to gxt to 4.x? 

Thanks
Hari

On Tuesday, August 25, 2020 at 7:44:36 PM UTC+5:30 t.br...@gmail.com wrote:


On Tuesday, August 25, 2020 at 1:01:47 PM UTC+2, Hari wrote:
Hi Team,

(Apologies if the answers to my question are based on individuals opinion based, but i am in dire need of your help)

I am currently stuck with an old GWT 2.1.0 application written in Java 1.6 which needs to be updated to java 1.8, so we are planning to upgrade to latest GWT version 2.9.0. There are no changes to the application code or any new enhancement request in last 5 years, considering this our client is expecting no changes to look and feel of the application but from the compliance perspective we are required to upgrade to at least Java 1.8.

But i have no experience and never used GWT, and there are very few guides out there on upgrade from 2.1.0 to 2.9.0 (I know its a big jump). Can someone help me understand, how to start the upgrade process, and how much code changes would i need to make the application compatible with the new version, will it be complete re-wright of the UI component of the application? or will it be minor changes to existing code ? Finally, if the upgrade requires complete re writing of UI component, is it worth it for me to lean GWT (considering recent slow down in upgrades to GWT) and uses it in the upgrade instead of complete rewrite of UI in React.

It depends on your dependencies.
GWT 2.2 had a breaking change for some third-party libraries (using GWT generators, by turning some abstract classes into interfaces), so make sure you also update your third-party libraries.
Otherwise, things should work without too much breakage AFAICT, and should also look the same (again, depending on the additional libraries the project uses).
See http://www.gwtproject.org/release-notes.html (and yes, the breaking change in 2.2 is not documented there ¯\_(ツ)_/¯ )

--
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/cd194a59-5717-48e2-aed0-2c521a6918afn%40googlegroups.com.

No comments:

Post a Comment