Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

HowtoUseHostedModeOfEclipseGwtPlugin

pfisterer edited this page Jun 7, 2011 · 6 revisions

How to use hosted mode with Eclipse and the GWT Plugin

For increasing the productivity when working with GWT, it is recommended to work with the GWT Eclipse Plugin. This side will show you the tipps and tricks to get the hosted mode working with Eclipse.

Needed Plugins

Before you can create a new runtime configuration you need the following plugins be installed in Eclipse:

Remove the Exlusion of the Resource Folders

The most annoing thing when using Eclipse is the automatic exclusion of all resources from the build path. This generates the most of the errors when working the first time with GWT. This can be solved by simply opening the properties of the client project. Go there to the "Java Build Path" entry. Select the "source" tab, select under client/src/main/resources the "Excluded" entry and click on the "Remove" button. After this behind "Excluded" should now be written "(None)". Now you should also see that the resources are represented as a package structure.

Enable GWT Plugin Support

Now you can enable the GWT Plugin support for the client project by going to the project properties. On the left side select "Google/Web Toolkit" and check the "Use Google Toolkit". Use as default SDK GWT 2.2.0 and control that the Entry point WiseUi is added to the list. When it is not add to the list, check the previous step!

Creating the Runtime Configuration

When you try to run your client project as Web Application you will get an error. But this can be solved by simply creating a Run Configuration manually. Then go to the Run Configurations... Dialog and double click on Web Application. In this new configuration go to the Main tab. In the empty field for the Main class: insert the following class:

com.google.gwt.dev.DevMode

Now go to the "Arguments" tab and enter the following:

-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl WiseUi.html -logLevel INFO -port 8888 -war "<workspace>\wiseui\client\src\main\webapp" -codeServerPort 9997 eu.wisebed.wiseui.WiseUi

Replace the <workspace> part with your path to the workspace.

Now you can click on "Apply" and run the WiseUi inside Eclipse.

Unable to locate Spring NamespaceHandler for XML schema namespace

The following error can occur when running WiseUi in Eclipse:

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx]
Offending resource: class path resource [persistence-spring-config.xml]

This error only occurs in Eclipse and relates to the Issue #45 in our bug tracker. The current solution for this problem is to extract the spring.handler file from the spring persistence JAR and add this file to the META-INF directory of the persistence module.