• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got this error message when deploying a JSP: java.lang.NoClassDefFoundError: org/apache/soap/rpc/RPCMessage

This error points to the line " gs=new GoogleSearch();" where GoogleSearch is a defined class. I tested it on my local computer and it worked well.

Do you have any idea what type of exception is this ? Thank you.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like your app is missing a jar file.

Which jar on your local machine contains:
org/apache/soap/rpc/RPCMessage?
 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to set org.apache.soap.rpc.RPCMessage and other dependent classes in classpath.

One easy way is place your jar containing these classes in application lib folder.

Second import your GoogleSeearch class in jsp by page directive




Naseem
 
ngo thanhson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's great. It worked. I missed a jar file, so I copied it into WEB-INF/lib. Btw, why do we need a jar file because I unziped it already? I thought that I we only need the .class file inorder to call third-party class.

Thank you so much.
[ July 06, 2006: Message edited by: ngo thanhson ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may have unzipped it in the wrong place.
Anyway, you should not unzip jar files
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ngo thanhson:
I thought that I we only need the .class file inorder to call third-party class.



If you want to extract the class, you need to make sure you put the file in the correct place (WEB-INF/classes/{full package structure}/class).

Also, that class may or may not have dependencies of it's own.
There is a good chance that those dependencies are not going to be listed in the author's documentation if they are all included in the jar file.
IOW: Unless you have a real good reason to do so, don't unpack the jar file.
 
reply
    Bookmark Topic Watch Topic
  • New Topic