gwt compilation issues while upgrading from GWT 2.7.0 to GWT 2.9.0

503 views
Skip to first unread message

pratik thaker

unread,
Feb 23, 2021, 9:09:24 AM2/23/21
to GWT Users
Hi Team,

Currently we are using SmartGWT 4.1 LGPL, GWT 2.7.0 & Java 1.8 with below supporting libraries

gin-2.1.2.jar
gwt-presenter-1.1.1.jar
gwtexporter-2.4.0.jar
guice-3.0.jar
javax.inject.jar
guice-assistedinject-3.0.jar
aopalliance.jar
gwtx-1.5.2.jar

While just upgrading to GWT 2.9.0 and doing gwt compile, i am getting below error,

[ERROR] Unable to find class java/lang/Enum
     [java]          Resolving method valueOf
     [java]             [ERROR] Unable to resolve type java/lang/String of argument arg0

It is also having too many occurrences of below error,

[ERROR] Unable to find class java/lang/Object

Any suggestion about how to resolve it, or if you need more details ?

Thanks

Thomas Broyer

unread,
Feb 24, 2021, 3:27:47 AM2/24/21
to GWT Users
IIRC, gwtx replaces/shadows some emulated classes; it's likely that it's the one causing issues here.
Try compiling with -failOnError, and/or look at the beginning of the compiler output for early problems that will cascade and cause everything else to fail.

pratik thaker

unread,
Feb 24, 2021, 9:09:45 AM2/24/21
to GWT Users
Thanks Tom for quick reply,

I am having -failOnError and changed the log to Trace. Below is more detailed logging of error.

     [java]    Rotating PersistentUnitCache file because only 0 files were added.
     [java]    [WARN] Warnings in 'jar:file:/C:/Pratik/ETD/Import/SmartClient/SmartGWT/4.1/lib/smartgwtpro.jar!/com/smartgwt/client/widgets/calendar/Calendar.java'
     [java]       [WARN] Line 3352: Referencing deprecated class 'com.smartgwt.client.widgets.calendar.events.EventHoverHTMLEvent'
     [java]    Tracing compile failure path for type 'java.io.FilterOutputStream'
     [java]       [ERROR] Errors in 'jar:file:/C:/Pratik/ETD/Import/Google/GWT/2.9.0/gwt-user.jar!/com/google/gwt/emul/java/io/FilterOutputStream.java'
     [java]          [ERROR] Line 74: The constructor IOException(Throwable) is undefined
     [java]    Tracing compile failure path for type 'java.util.regex.Pattern'
     [java]       [ERROR] Errors in 'jar:file:/C:/Pratik/ETD/Import/Google/gwtx/1.5.2/gwtx-1.5.2.jar!/com/googlecode/gwtx/java/util/emul/java/util/regex/Pattern.java'
     [java]          [ERROR] Line 183: Referencing class 'com.googlecode.gwtx.java.util.emul.java.util.regex.Pattern': unable to resolve class
     [java]          [ERROR] Line 194: Referencing class 'com.googlecode.gwtx.java.util.emul.java.util.regex.Pattern': unable to resolve class
     [java]          [ERROR] Line 149: Referencing class 'com.googlecode.gwtx.java.util.emul.java.util.regex.Pattern': unable to resolve class
     [java]          [ERROR] Line 140: Referencing class 'com.googlecode.gwtx.java.util.emul.java.util.regex.Pattern': unable to resolve class
     [java]    Removing invalidated units
     [java]    Resolving com.dclear.cmn.caa.domain1.AccessLevel
     [java]       Found type 'com.dclear.cmn.caa.domain1.AccessLevel'
     [java]          [ERROR] Unable to find class java/lang/Enum
     [java]          Resolving method valueOf
     [java]             [ERROR] Unable to resolve type java/lang/String of argument arg0

pratik thaker

unread,
Feb 24, 2021, 11:28:06 AM2/24/21
to GWT Users
Hi All,

After removing gwtx, things seems to be working for now.

Will come back if i am facing anything new.

Thanks for your help Tom.

pratik thaker

unread,
Feb 25, 2021, 7:38:48 AM2/25/21
to GWT Users
Hi All,

Thanks to your support, I was able to resolve the compilation issue just by changing to GWT 2.9.0 and removing gwtx.

There were changes which i had to do because of removal of gwtx. Like not using java.text classes (SimpleDateFormat, DecimalFormat etc.) and using GWT compatible classes as an alternate.

I also faced issues due to removal of closure compiler. Had to do some refactoring to remove unused classes from the mentioned <source path= package

Thanks again to all.
Reply all
Reply to author
Forward
0 new messages