Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
 


Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 

As always the NoClassDefFoundError is caused due to classpath problems or missing jar files.
In this case, This is caused when the commons-logging-1.1.1.jar file is not in your path.

 

Follow these steps to solve this problem.

  1. Download the commons-logging-1.1.1.jar file or later version from the following url.
  2. http://commons.apache.org/proper/commons-logging/download_logging.cgi  (download and extract the jar files in your computer)
  3. Add the commons-logging-1.1.1.jar file to your 'lib' folder in your project if you are using an IDE like netbeans or add it to your classpth if you are doing it manually
  4. Rebuild your project and run.
 
 
 
 
 
COPYRIGHT © 2017 java-samples.com. ALL RIGHTS RESERVED.