This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes GWT and the fly likes GWT - No source code is available error. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GWT - No source code is available error." Watch "GWT - No source code is available error." New topic

GWT - No source code is available error.

Adi Vicks

Joined: Feb 23, 2012
Posts: 9
I am facing one error while running my GWT application.

Line 62: No source code is available for type; did you forget to inherit a required module?

Note: PQR is a class present in another project/directory. I have added that project's jar to my build path so didn't get any compilation error in eclipse. But seems like jetty deployment not working. I am using google plugin for eclipse to develope this application. Both the projects are under same folder.

I added the project as reference project to my project but no luck.

Any help ?
Tina Smith
Ranch Hand

Joined: Jul 21, 2011
Posts: 208

To make the Java files available to the GWT compiler you need to

Create a gwt.xml file in the Java project / jar file which you want to use - This will instruct the GWT compiler to use the listed classes.

Use the included library via the inherit definition

If you are using a jar file you also need to include the source files in the jar


If you don't have access to the Java project/jar file, or don't want to explicitly link it to GWT, you can include the gwt.xml file in the same package within your GWT project rather than within the other project.

Everything is theoretically impossible, until it is done. ~Robert A. Heinlein
Adi Vicks

Joined: Feb 23, 2012
Posts: 9
Thanks for the link. Its working now. Also I forgot to add the dependency jars in the war/web-inf/lib folder.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: GWT - No source code is available error.