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 com.google.gwt.user.server.rpc.RemoteServiceServlet; did you forget to inherit a required module?
2nd 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.
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;"
2nd 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" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='test'>
<inherits name="com.google.gwt.user.User" />
<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" />
</module>
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 the 2nd error?
Think I see it:
Test.java
should be in the client.test
package not just client
, or everything should point to client.Test
rather than client.test.Test
.