• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GWT - No source code is available error.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
eat bricks! HA! And here's another one! And a tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic