NoClassDefFoundError when running RPC in hosted mode

20 views
Skip to first unread message

drdo...@gmail.com

unread,
Jul 11, 2007, 8:11:53 AM7/11/07
to Google Web Toolkit
Hello!
I am getting the below error when I try to run my app in hosted mode.
My app was working great until I added an RPC call. To process the
RPC call on the server side, I added and some 3rd party java libraries
to the classpath. My app compiles fine in Eclipse. But when I run in
hosted mode it behaves as though it cannot find my 3rd party jar
files.
Thanks for help!
David

[WARN] StandardContext[]Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract boolean
com.myapp.wizard.client.RdfStoreService.store(com.myapp.wizard.client.APersistable)'
threw an unexpected exception: java.lang.NoClassDefFoundError: com/hp/
hpl/jena/rdf/model/Model
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
268)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
366)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
222)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
174)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:
249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
214)
Caused by: java.lang.NoClassDefFoundError: com/hp/hpl/jena/rdf/model/
Model
at com.myapp.wizard.server.RdfStoreServlet.store(RdfStoreServlet.java:
31)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
348)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
222)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
174)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:
249)

Isaac Truett

unread,
Jul 11, 2007, 9:04:22 AM7/11/07
to Google-We...@googlegroups.com
Did you add the 3rd party jar to your hosted mode classpath?

drdo...@gmail.com

unread,
Jul 11, 2007, 9:13:56 AM7/11/07
to Google Web Toolkit
Isaac,
What is "hosted mode classpath"? I have added the 3rd party jar files
to the classpath in my Eclipse project.
Thanks!
David

On Jul 11, 9:04 am, "Isaac Truett" <itru...@gmail.com> wrote:
> Did you add the 3rd party jar to your hosted mode classpath?
>

Isaac Truett

unread,
Jul 11, 2007, 9:21:34 AM7/11/07
to Google-We...@googlegroups.com
When you run hosted mode, you're invoking the main() method of a Java
class (com.google.gwt.dev.GWTShell). Any time you're executing Java
code, you have a classpath. Whatever way you are choosing to start
hosted mode (shell script, ANT build, Eclipse run configuration...),
you need to be sure that the jar is included in the classpath.


On 7/11/07, drdo...@gmail.com <drdo...@gmail.com> wrote:
>

drdo...@gmail.com

unread,
Jul 11, 2007, 9:42:48 AM7/11/07
to Google Web Toolkit
I am running my app by double clicking the
MyApp-shell.cmd
file

I believe this .cmd file was created when I ran the tool
applicationCreator

Should I edit the file
MyApp-shell.cmd
?

Thanks!
David

On Jul 11, 9:21 am, "Isaac Truett" <itru...@gmail.com> wrote:
> When you run hosted mode, you're invoking the main() method of a Java
> class (com.google.gwt.dev.GWTShell). Any time you're executing Java
> code, you have a classpath. Whatever way you are choosing to start
> hosted mode (shell script, ANT build, Eclipse run configuration...),
> you need to be sure that the jar is included in the classpath.
>

Isaac Truett

unread,
Jul 11, 2007, 10:23:51 AM7/11/07
to Google-We...@googlegroups.com
Yes.

On 7/11/07, drdo...@gmail.com <drdo...@gmail.com> wrote:
>

Reply all
Reply to author
Forward
0 new messages