• 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

Reasons for java lang NoClassDef

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I have a Utility class with a method, returning all file names as an arraylist, given a package name as String.

This class is working absolutely fine, when running stand alone .



Now, I tried to use this class from a servlet, to get back the list of file names and the servlet would provide the package name as a string argument.

But I'm recieving the following error


From the message, it is clearly seen that the utility class is called and it listed file name (CPSDBTestCase.class is displayed) . However, when trying to call StringUtils.searchReplace() method, I'm getting the error.

I'm not sure why StringUtils class is not found, though jar file is in lib folder of WEB-INF. I did not make any specific changes to classpath and in fact I never did for all my successful executions too. I use the IDE which would probably do the job for me, while building and packaging.

Can some one guide me on this problem.
 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It was my bad. I didn't see the libraries properly. One of the libraries were missing in WEB-INF/lib folder...
 
reply
    Bookmark Topic Watch Topic
  • New Topic