• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

GWT - No source code is available error.  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing one error while running my GWT application.

Line 62: No source code is available for type com.abc.PQR; 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 ?
 
Ranch Hand
Posts: 208
9
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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


From: http://www.vogella.de/articles/GWTModules/article.html

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.

 
Adi Vicks
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the link. Its working now. Also I forgot to add the dependency jars in the war/web-inf/lib folder.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!