GWT - Compilation error: no source code for type

I am creating a GWT application from Maven.

When compiling, get the following message:

Validating newly compiled units 

This is a warning first:

 [WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts 

Then the following error occurs:

 [ERROR] Line 19: No source code is available for type org.apache.commons.lang.StringUtils did you forget to inherit a required module? 

Despite the fact that this assembly does not crash, and Dev mode is working correctly. How can I get rid of these error messages?

+4
source share
2 answers

Perhaps the reason is in your module file. You must define the packages that must be compiled. This is configured in the .gwt.xml module.

 <source path="packagename"> 

And the GWT compiler will compile the gwtxmlmodulepath.packagename packages.

More details

+9
source

The error means that part of the client code (for compilation as javascript) contains a reference to the StringUtils class from Apache Commons. This is not allowed because this library contains code that is not compatible with the GWT client.

+8
source

All Articles