• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Runtime Servlet Exception: NoClassDefFoundError

 
Sunny Chandra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have been trying to execute a custome servlet application with overridden doGet() which handles the ServiceException for handling the Web service response from the server side.

When I try to compile the servlet, all is well! But during the runtime, I am slapped with the NoClassDefFoundError; the partial stacktrace is copied below:

java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
java.lang.Class.getConstructor0(Class.java:2699)
java.lang.Class.newInstance0(Class.java:326)
java.lang.Class.newInstance(Class.java:308)

The point to note here is jaxrpc jar is there in the classpath and visible in the environment variables in Tomcat's library path. Any suggestions?
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jaxrpc.jar is missing from classpath. Make sure that jaxrpc.jar is in classpath. Are you using axis? the file is bundled with axis distribution.

Alternatively you can put j2ee.jar in classpath.
[ December 15, 2008: Message edited by: sudhir nim ]
 
Sunny Chandra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sudhir - Thank you for the previous post! However, I have mentioned the last point in the post that jaxrpc is in the classpath; which I rightly picked from the Axis lib.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> The point to note here is jaxrpc jar is there in the classpath
> and visible in the environment variables in Tomcat's library path.

how about putting jaxrpc.jar inside WEB-INF/lib ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic