GWT development mode does not compile web application

When I want to compile my GWT application in eclipse via "Run as → GWT application", I get the following message:

00: 00: 00,005 The [WARN] module declares the servlet class com.google.gwt.junit.server.JUnitHostImpl, but web.xml does not have a corresponding declaration; add the following lines to your web.xml:

<servlet> <servlet-name>jUnitHostImpl</servlet-name> <servlet-class>com.google.gwt.junit.server.JUnitHostImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>jUnitHostImpl</servlet-name> <url-pattern>/AdminInterface/junithost/*</url-pattern> </servlet-mapping> 

When I add these lines to my web.xml, the message no longer occurs, but the compiler seems to be frozen. Usually, a link to the "Start URL" appears at the top of the window, which will lead me to the page of my web application. But he says “calculate” all the time, and the process itself does not use CPU time.

Does anyone know how to fix this?

+4
source share
2 answers

The reason for this post is that you have *.gwt.xml , which is <inherits name="com.google.gwt.junit.JUnit" /> . There is no reason to ever include this module directly; it will be automatically added when you start GWTTestCase s.

The gwt-maven-plugin archetype is known to include such a module (one of the many reasons why I do not recommend using this archetype).

Remove the offensive <inherits> and try again (and do not add the proposed servlet to your web.xml).

+5
source

When I want to compile my GWT application in eclipse via "Run as → GWT application", I get the following message

You are not really compiling, you are working ...

You must compile the project using the blue icon as shown. You are currently working.

enter image description here

In this list, you can select GWT COMPILE PROJECT (red icon), and you need to select your file yourProjectName.gwt.xml.

Then it will start compiling .

About frozen browser problem.

I think this frozen issue occurs after clicking on the generated url. When you click on the link, the application launches in the browser by default.

If you compile it, it will not generate any URL, and the message should appear in the Eclipse console that " Compile Succeeded ".
In fact, the GWT application running in the browser at this time is in development mode.

+1
source

All Articles