Error: com.google.gwt.user.client.rpc.StatusCodeException: 404 on Tomcat server

919 views
Skip to first unread message

Maurice

unread,
Feb 24, 2012, 3:30:38 PM2/24/12
to Google Web Toolkit
Hello All,

I am having problems getting my RPC code working on a Tomcat server
hosted by serversanddomains.com. The steps I have followed are:
1) Using GWT 2.4, and eclipse I create an new web application project
- with a
project = Hello
package = com.gwt.hello
Using Google Web ToolKit
Not using Google App Engine
And Using Generate project sample code

2) In the generated file com.gwt.hello.client.Hello.java I change line
serverResponseLabel.setHTML(SERVER_ERROR); to
serverResponseLabel.setHTML(caught.toString());
To understand the errors better.

3) I then test the program in development mode and it works as
expected.

4) Compile - Build the project with the GWT compiler
Compiling module com.gwt.hello.Hello
Compiling 6 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compiling permutation 5...
Compile of permutations succeeded
Linking into /Users/xxx/Documents/www/Hello/war/hello
Link succeeded
Compilation succeeded -- 65.826s

5) Upload the files everything in the war directory (Folders hello,
WEB-INF and files Hello.html, and Hello.css) into my hosted account in
the public_html folder

6) Test the production site at http://www.example.com/Hello.html
I get the following error

Sending name to the server:
GWT User

Server replies:
com.google.gwt.user.client.rpc.StatusCodeException: 404
Not Found

The requested URL /hello/greet was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.

7) Contacted serversanddomains.com and they respond

There does not appear to be any error on the server side. The jsp test
page seems to be working fine now at http://example.com/jsptest.jsp so
tomcat itself appears to be just fine.

The page in question is simply trying to request a file URL which does
not exist. When submitting the form, this shows up in the error log
for apache.

[Thu Feb 23 16:44:31 2012] [error] [client 208.74.121.102] File does
not exist: /home/xxx/public_html/hello/greet, referer: http://example.com/Hello.html

That's because there is no such file called "greet" in the hello
folder. This is likely because you have not properly installed the
application.
=========================================================================================

So we have written back to see if we can get exact steps on how you
need to upload everything.

But I can tell you that if you get hosting with Plesk on Linux with
us, Plesk allows you to upload your WAR files and it creates the
application for you for your site.


8) Tried to follow the steps outlined in
http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideRPCDeployment
Simple Example with Apache Tomcat


Thanks for taking the time to read this, and any suggestions are
welcome.

Cheers,
Maurice



Maurice

unread,
Mar 5, 2012, 7:53:47 PM3/5/12
to Google Web Toolkit
Hi All,

I still have not been able to resolve this issue, any advice?

Thanks
> 6) Test the production site athttp://www.example.com/Hello.html
> 8) Tried to follow the steps outlined inhttp://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunicat...

Maurice

unread,
May 21, 2013, 5:53:24 PM5/21/13
to google-we...@googlegroups.com
Hi Ahmed,

Yes the problem was the hosting company did not support GWT.  I now use arvixe.com which works fine.



Good luck


On Monday, May 20, 2013 1:17:58 PM UTC-6, Ahmed El-Fayomy wrote:
I'm having the exact same problem, any luck?!
Reply all
Reply to author
Forward
0 new messages