How to fix [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core'
Asked Answered
H

4

9

I want to start a Web Development project with GWT in Eclipse. For that I am following the tutorial on http://www.gwtproject.org/doc/latest/tutorial/create.html

The form to create the Project does not exactly look like they explain. For example I cannot make a checkmark at "Use Google App Engine" since it does not exist. To get the build.xml I checkmarked the "Generate an Ant Project" field.

When I try to run the generated code, the following error occurs:

Turning off precompile in incremental mode.
Super Dev Mode starting up
workDir: /tmp/gwt-codeserver-9585554490549923267.tmp
2019-02-03 18:36:10.619:INFO::main: Logging initialized @879ms
Loading Java files in com.google.gwt.sample.stockwatcher.StockWatcher.
[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')

When I try to use the command line version of their tutorial, I get an 503 Error:

HTTP ERROR: 503

Problem accessing /StockWatcher.html. Reason:

    Service Unavailable

Powered by Jetty://

I use GWT SDK 2.8.1 and Java 10

I installed already lots of plugins for Eclipse, so that I am quite sure to have all plugins I need. Maybe this could be something with the Java version? Does anyone has an idea?

Hellbent answered 3/2, 2019 at 18:8 Comment(3)
The Eclipse plugin has been updated. Take a look here: youtube.com/watch?v=x04sufQce-Y The "Use Google App Engine" has been removed (use Google Cloud Plugin instead). And, as the error message suggest: check, if you added the "com.google.gwt.user.User" module inside the moduel descriptor.Kunkel
If you just want a minimal starting-guide with gwt, I have created this tutorial which is updated to last best-practices (dev.to/ibaca/modern-gwt-first-steps-509k) but it is for client only app (minimal example!). Otherwise, I recommend using the tbroyer archetype (github.com/tbroyer/gwt-maven-archetypes).Bethina
Make sure you name your gwt tests like GwtTest___ to avoid them being picked up by the surefire plugin. The gwt plugin will run them in a separate test step (if you use GwtTestSuites).Creaturely
C
9
  1. Check that your gwt.xml really inherits "com.google.gwt.user.User"
  2. Check java sdk. Some gwt versions work only with java 1.8
  3. If you use Idea, there was a bug, which also causes this error: https://youtrack.jetbrains.com/issue/IDEA-218731?_ga=2.120118728.1133270638.1599566675-1712334692.1566210515
Crossroads answered 8/9, 2020 at 15:25 Comment(0)
A
6

Use 1.8.0 JRE to compile the GWT application. You can setup this in eclipse as shown below.

enter image description here

Then try to compile the application you will get the following output in console.

Compiling module com.somshine.miniproject.MiniProject Compiling 5 permutations Compiling permutation 0... Compiling permutation 1... Compiling permutation 2... Compiling permutation 3... Compiling permutation 4... Compile of permutations succeeded Compilation succeeded -- 21.193s Linking into D:\Java\gwtProject\miniProject\war\miniproject Link succeeded Linking succeeded -- 0.426s

Aphotic answered 6/5, 2021 at 5:18 Comment(0)
R
2

Make sure your JAVA_HOME is pointing to a JDK 1.8 version folder, as ant will use that to compile your sources

Rosetterosewall answered 6/1, 2023 at 1:50 Comment(0)
C
2

On Eclipse when you get this error, you should navigate to Windows->Preferences->Java->Installed JREs and make sure that whichever item is selected, is actually a JDK.

If it's not, change it to your JDK and make sure it's working with Java 1.8 SDK.

Composure answered 17/8, 2023 at 0:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.