gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.49k stars 370 forks source link

GWT compiling issue in java 11 #9945

Closed ilapavuluri closed 2 months ago

ilapavuluri commented 3 months ago

GWT version: 1.0 Browser (with version): Operating System: windows


Description

I am using GWT 1.0

We dont have any plans to upgrade since it is very costly effort, currently I am compiling in Java 1.8, I am planning to compile in Java 11, but getting below error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (GWT-Compiler) on project web: An Ant BuildException has occured: Java returned: 1
[ERROR] around Ant part ...<java fork="true" classname="com.google.gwt.dev.GWTCompiler" failonerror="true">... @ 4:85 in C:\Saurabh\itpam_core_development_wildfly_sj_New\itpam\itpam_core\ITPAM\web\target\antrun\build-main.xml

GWT dependencies:

<dependency>
            <groupId>gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>gwt</groupId>
            <artifactId>gwt-dev-windows</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>

GXT dependencies:

<dependency>
            <groupId>gxt</groupId>
            <artifactId>gxt-gwt22</artifactId>
            <version>2.2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>gxt</groupId>
            <artifactId>gxt</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>gxt</groupId>
            <artifactId>gxt-chart</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
Steps to reproduce
Known workarounds
Links to further discussions
niloc132 commented 3 months ago

GWT 1.0 was never made public - it is quite unlikely that you used anything before 1.1.0 or so. Are you perhaps using a custom build of GWT? If not, can you find out what the correct version is?

The gxt-gwt22.jar was released to fix incompatibilities with GWT 2.2+ and should be compatible up to GWT 2.6 (when the switch from com.google.gwt.user.client.Element to com.google.gwt.dom.client.Element was completed). It was not compatible with GWT 2.1 or earlier (including 1.x).

On the other hand, GXT 3.0.1 required a minimum of GWT 2.4.0, and also supported at least GWT 2.5, and I believe up to 2.8, at least without modifications to XTemplatesGenerator. Likely you are actually using GWT 2.4.0-2.5.1.

With that said, gwt-dev-windows was not shipped after GWT 2.0.0, so you might have a blend of several projects, or mixed classpath from 1.x and 2.x?

Note that even 2.5.1 is over 10 years old at this point, shortly before Java 8 was released. Java 11 wasn't released until about 5 years later - I believe that GWT 2.8.2 was the first version to officially support running on Java 9+. The GWT project doesn't typically offer backports, though we're considering an exception to keep Java 8 support alive right now in the 2.11 after 2.12 is released.

Once you work out which GWT build you are actually using, we can discuss here, on the mailing list, or in the Gitter chat the kinds of changes that would be required to update your project. Alternatively, you can contact us at Vertispan for commercial support in your project.


Additionally, there isn't enough information in the error you shared - can you share the complete build log? I'd hope to see a stack trace at least?

niloc132 commented 2 months ago

Closing until we have more information.