Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory exception

If you're using maven for managing dependencies, add the following line in your pom.xml:

<dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.1</version>
</dependency>

I have also faced the same issues, to fix, download the jar files from the below url

http://commons.apache.org/logging/download_logging.cgi

and copy to your lib folder, will resolve your issue.


You just download commons-logging-1.1.2.jar and then copy this file in to libs

finally, it works.


commons-logging-1.1.1.jar or jcl-over-slf4j-1.7.6.jar al

If you are using maven, use the below code.

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>jcl-over-slf4j</artifactId>
    <version>${slf4j.version}</version>
</dependency>

I had the same problem, and solved it by just adding the commons-logging.jar to the class path.