Irene Irene - 3 months ago 20x
Java Question

GWT Module inheritance and NO source code available on application running time

I am starting to use GWT for a class project and wanted to know real use cases for RPC. So, I found this example on this same website: Stack Overflow - Simple RPC Use Case Problem (Code Included)

Why I did this example? because I was getting the same errors that the user posted on my own project and I decided to try and follow his code on my computer to see if I could really face my own mistakes.

So the point is that after copying the files on an Eclipse GWT project and deploy the app, I got this two errors on running time:

[1st Error]

12:14:07.874 [ERROR] [test] Line 17: No source code is available for type; did you forget to inherit a required module?

[2n Error]

12:42:54.547 [ERROR] [test] Unable to find type 'org.redboffin.worldhug.client.test.Test'

12:14:09.341 [ERROR] [test] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly

So I tried to correct Test.gwt.xml as Craig suggested on the post. Unfortunately, that solution is not working to me because still I am getting the same errors. Here you can see an image link (on Imageshack) to my Eclipse screen:

[1st Error] I don't know what is happening because, for example, in the file it is depicted, RemoteServiceServlet is imported some rows before (despite it is not seen). This file is on package "org.redboffin.worldhug.server.test;"

[2n Error] If user who posted initial thread did not need to "inherit" a new package in his project, I can't understand why do I need them. Anyway, I put a new inherit line one the .gwt.xml file:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.0//EN" "">
<module rename-to='test'>
<inherits name="" />
<entry-point class="org.redboffin.worldhug.client.test.Test"></entry-point>
<source path="client" />
<source path="shared" />
<inherits name="org.redboffin.worldhug.client.test.Test" />

And that is what I got:

Loading inherited module 'org.redboffin.worldhug.client.test.Test'
[ERROR] Unable to find 'org/redboffin/worldhug/client/test/Test.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

(of course, it didn't compile)

So, I really don't know what is going on. Please, can someone bring some light to this issue? Why is this not working? What I am doing bad? What is this type that it is needed on [2nd error]?

Many thanks to all for reading so far,



Think I see it: should be in the client.test package not just client, or everything should point to client.Test rather than client.test.Test.