Home » Java » Migrating a GWT 2.5 web app to Java 10

Migrating a GWT 2.5 web app to Java 10

Posted by: admin October 24, 2018 Leave a comment

Questions:

I have a substantial web-app that is built using GWT-2.5.1 and Java 8. With the deprecation of Java 8, I need to migrate this to Java 10 / 11.

I’ve managed to get past a few issues, but I’ve hit one I cannot get past.

When building the app, I get the following error:

[INFO] Compiling module com.<xxx>
[INFO]    [ERROR] Unable to find type 'java.lang.Object'
[INFO]       [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')

Looking at the gwt.xml files, it looks correct to me:

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to="xxxx">
    <inherits name="com.google.gwt.user.User" />
    <inherits name="com.google.gwt.user.theme.clean.Clean" />
    <inherits name="com.google.gwt.logging.Logging" />
    <inherits name="com.XXXXCoreBase" />
    <!-- Delete non-0inherits stuyff -->
</module>

<!-- XXXXCoreBase -->
<?xml version="1.0" encoding="UTF-8"?>
<module>
    <!-- Inherit the core Web Toolkit stuff. -->
    <inherits name="com.google.gwt.user.User" />
    <inherits name="com.google.gwt.query.Query"/>
    <!-- Other module inherits -->
    <inherits name="com.google.gwt.gen2.gen2" />
    <inherits name="com.Microsoft" />
    <inherits name="org.Org" />

    <source path="client" />
    <source path="shared" />

</module>

This compile quite happily with Java 8. What do I need to do to fix this?

Answers: