• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reasons for java lang NoClassDef  RSS feed

 
Schandha Ravi
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • 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
  • 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...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!