Reputation: 728
I get the following error while calling my GWT RPC function,
com.google.gwt.user.client.rpc.StatusCodeException: 500
I did add the remoteservicepath and also servlet name and mapping in my web.xml, but i get the error
Could not initialize class com.logins.server.Putquestion Caused by:java.lang.NoClassDefFoundError at sun.reflect.GeneratedConstructorAccessor19.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:428) at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)...
Note: 1)com.logins.server.PutQuestion is server code that implements the rpc Interface defined at client side.
Any guesses where i am going wrong ?
Upvotes: 2
Views: 5300
Reputation: 4313
You have classes in your classpath of your editor but not during runtime.
The trace says that you have some exception thrown within the constructor that gets propagated to the classloader. Try wrapping your constructor with try/catch and print the stack trace. Probably you are looking up the database/file which could be down/not present.
Upvotes: 1
Reputation: 3240
Make sure that the servlet class is present in war/WEB-INF/classes folder.
Upvotes: 1