Upgrade from gwt 2.0.0 to 2.11.0 erroring out
Closed this issue · 4 comments
We are trying to upgrade from
google:gwt-dev:2.0.0 --> org.gwtproject:gwt-dev:2.11.0
google:gwt-user:2.0.0 --> org.gwtproject:gwt-user:2.11.0
google:gwt-servlet:2.0.0 -> org.gwtproject:gwt-servlet:2.11.0
extjs:gxt:2.1.0 -> com.sencha.gxt:gxt2.2.5-gwt2.X:2.7.0
This is being done as the project is being upgraded from Java 8 to Java 17. Getting below error
GWT version:2.11.0
Browser (with version):NA
Operating System:Mac
Description
[ant:java] [ERROR] Errors in 'jar:file:/build/gwt-classpath/gwt-user-2.11.0.jar!/com/google/gwt/emul/java/util/Set.java'
[ant:java] [ERROR] Line 72: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 82: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 47: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 52: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 22: The import jsinterop cannot be resolved
[ant:java] [ERROR] Line 57: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 62: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 32: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 42: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 37: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 21: The import jsinterop cannot be resolved
[ant:java] [ERROR] Line 96: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 30: JsType cannot be resolved to a type
[ant:java] [ERROR] Line 67: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 77: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Line 87: JsIgnore cannot be resolved to a type
[ant:java] [ERROR] Errors in 'jar:file:/build/gwt-classpath/gwt-user-2.11.0.jar!/com/google/gwt/emul/java/lang/IllegalArgumentException.java'
[ant:java] [ERROR] java.lang.String cannot be resolved to a type
This is blocking whole java upgrade any help is appreciacted
Is jsinterop-annotations on your project classpath? This was historically part of GWT itself, but version 2.8.1 RC1 split it out into its own jar, which you need to depend on separately.
GWT 2.0.0 to 2.11.0 is a huge jump, 15 years of changes, many release notes entries to review. Plus, you almost certainly will also need to update your GXT version as well, so keep an eye out for that.
I have added jsinterop-annotations-2.1.0.jar to the classpath but what is not too clear is what is giving errors like this java.lang.String cannot be resolved to a type. Also is there a recommended version for gxt which used should be used
The "String cannot be resolved to a type" means that there are still errors in the String.java file, like jsinterop-annotations being missing (since String uses jsinterop rather than JSNI now). Sharing the complete build log will help to track this down - but if you are still having jsinterop errors, you'll need to recheck how you changed the classpath.
I can't speak for what releases Sencha has that will work with recent GXT versions, you may need to do a little experimentation, post in their forums, or on the GWT mailing list. At a very quick glance, 2.3.1-gwt22
is the last GXT 2.x version that was made, but I believe there are two or so changes that have to be made to get it to compile with GWT versions past 2.4.0 or so. They appear to be both described in this thread:
https://groups.google.com/g/google-web-toolkit/c/IZRriHLTWxA/m/DIerF5bzAgAJ
Sencha has not supported the GXT 2.x series since 4.0.0 was released, about 8.5 years ago. Our company, Vertispan, can offer some paid support here if you have the appropriate GXT licenses and can't or don't want to post more details publicly that will help solve this.
No further details, closing - try the mailing list, stackoverflow (with the gwt
tag), or join the live gitter chat if you still need help.