Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Runtime Servlet Exception: NoClassDefFoundError

 
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?
 
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.
 
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 ?
 
Attractive, successful people love this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic