RPC deployed does not work :/

3 views
Skip to first unread message

me

unread,
Jan 25, 2008, 1:01:44 AM1/25/08
to Google Web Toolkit
I have done this example.
http://www.manning-source.com/books/hanson/sample-ch10_GWTiA.pdf

running an RPC

it runs fine locally

Now I want to deploy it on an actual OpenLinux 10.2 server running
Apache Tomcat/6.0.10 1.6.0_01-b06 Sun Microsystems Inc. Linux
2.6.18.8-0.5-default i386

local Windows XP with GWT 1.4

www/com.me.ServerStatus/all the files
Servlet is in gwt/bin/com/me/server/ServerServiceImpl

runs in hosted mode and if I leave the apache running fine from the
host

now if I copy all files to the server

under

/com.me.ServerStatus/all the js html rpc etc files
/com.me.ServerStatus/WEB-INF/web.xml
/com.me.ServerStatus/WEB-INF/classes/com/me/server/ServerServiceImpl
/com.me.ServerStatus/WEB-INF/lib/gwt-servlet.jar

and in web.xml

<servlet>
<servlet-name>ServerServiceImpl</servlet-name>
<servlet-class>
com.me.server.ServerServiceImpl
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>ServerServiceImpl</servlet-name>
<url-pattern>/server-status</url-pattern>
</servlet-mapping>


and I load

http://www.example.com:8080/com.me.ServerStatus/ServerStatus.html

I can see in the tomcat log it tries to RPC but sadly fails with
java.lang.NoClassDefFoundError: com/me/client/ServerStatusService

As far as I understood it all client stuff is done in javascript?

Or what else am I doing wrong ?



FATAL: Allocate exception for servlet ServerServiceImpl
java.lang.NoClassDefFoundError: com/me/client/ServerStatusService
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:
1815)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:
872)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1325)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1204)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1083)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
806)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
133)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
216)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:619)









NN

unread,
Jan 25, 2008, 2:00:00 AM1/25/08
to Google Web Toolkit
make sure you copy server and client folder under WEB-INF/classes/
<your package directory>/server and /client

On Jan 24, 10:01 pm, me <nils.koest...@gmail.com> wrote:
> I have done this example.http://www.manning-source.com/books/hanson/sample-ch10_GWTiA.pdf

Adam T

unread,
Jan 25, 2008, 2:28:25 AM1/25/08
to Google Web Toolkit
Hi,

You need, as NN says, to copy more than just the ServerStatusImpl code
to the server.

Have a look at figure 10.10 in Chapter 10 and you'll see you need the
ServerStatusService and ServerStatusImpl classes on the server side,
as the error is telling you (plus you will also need the class
ResultBean).

Client and server side must have a contract on what functionality is
implemented and that is driven through the ServerStatusService
interface, which is why it needs to appear on both the client and
server side. The ResultBean needs to be on server side so you can
create the object that is passed back to the client.

Hope that helps.

//Adam

On Jan 25, 7:01 am, me <nils.koest...@gmail.com> wrote:
> I have done this example.http://www.manning-source.com/books/hanson/sample-ch10_GWTiA.pdf

someone

unread,
Jan 25, 2008, 9:26:44 AM1/25/08
to Google Web Toolkit
Thanks !

that did the trick.

Nitin

unread,
Jan 28, 2008, 9:15:12 AM1/28/08
to Google Web Toolkit
Hello Friends,


I have same problem. But i am not able to solve problem .

Please tell if any one have solution.
Reply all
Reply to author
Forward
0 new messages