NoClassDefFound error in web application deployed on Tomcat

212 views Asked by At

I am new to Java and trying to develop a Java web application with a feature to browse the server's file system. The functionality works fine when I run the application in Eclipse but if I generate a WAR file (via "Export as WAR" in Eclipse) and deploy on Tomcat 7, it throws a NoClassDefFound error.

I have placed the required jar in the WEB-INB/lib folder and also noticed the jar is available after deployment.

2

There are 2 answers

0
Anilkumar Bathula On

first check your BuildPath. Your jars are added to build path are not.check with this link

0
exoddus On

Without the Exception trace can't provide more details, but try the following:

  • Review the java.lang.NoClassDefFoundError error and identify the missing Java class.
  • Verify and locate the missing Java class from your compile / build environment. -Determine if the missing Java class is from your application code or third part API.
  • Go to Properties on your Project (right click) > Java Build Path > Order and Export. Check all needed librarys are included.

Hope this helps.