Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The module hasn't been compiled yet

I have GWT-Maven project created using IntelliJ. I can build and run it but the browser shows a strange error on home page. How to fix it?

I've tried to create new project and import the existing code but it doesn't help.

enter image description here

Project download: GwtStudy

like image 611
emeraldhieu Avatar asked Jun 23 '16 05:06

emeraldhieu


3 Answers

You need to run it GWT Development mode with Jetty.

The you will get a code server at http://127.0.0.1:9876/

and a web server at: http://127.0.0.1:8888/yourapp.html

See also this video: https://www.youtube.com/watch?v=kx9RxrQZnFA

like image 53
jankos Avatar answered Nov 15 '22 11:11

jankos


The tutorial is slightly misleading. You need to run the app by choosing "GWT Development mode with Jetty" and not "GWT development mode" as one may believe following the tutorial (the super dev mode is the standard nowadays).

If you run the app using "GWT development mode" you will start only the code server, that will run the java code, but it will not be able to serve the html page that hosts the stockwatcher application.

If you run it with "GWT Development mode with Jetty" you will get a code server at http://127.0.0.1:9876/ AND the web server at: http://127.0.0.1:8888/stockwatcher.html, that is the URL that you need to open with your browser to see the page that hosts the app (you can see that the docs shows the browser opening the url at port 8888 and not at port 9876).

The answer of Jankos is right but for me it was not enough clear. The video is not strictly needed or related to solve the issue, so I added this answer to help gwt beginners like me.

like image 6
arzillo Avatar answered Nov 15 '22 10:11

arzillo


This is the CodeServer, which compiles your app on-demand, and serves the compiled scripts and their source maps.

You need another web server to serve your webapp, including most importantly an html page that includes the nocache.js script.

Depending on how you "run" your app this may or may not already be the case (you'd need to give more information).

like image 3
Thomas Broyer Avatar answered Nov 15 '22 11:11

Thomas Broyer