Whats the root cause of Log4JLogger' cannot be found or is not useable?

commons logging vs log4j
apache commons-logging example
org apache commons logging
org apache commons-logging logfactory jar
commons logging log4j2
common logging

I have commons-logging.jar (v1.0.4) and log4j-1.2.8.jar in the classpath and getting following run-time error:

Caused by: org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable.
    at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:874)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)

If you using Maven, you must ensure declare commons-logging and log4j in pom.xml

<dependencies>
    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.3</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
    </dependency>
</dependencies>

if you declare only commons-logging you with getting error Log4JLogger cannot be found or is not useable

java, I have commons-logging.jar (v1.0.4) and log4j-1.2.8.jar in the classpath and getting following run-time error: Caused by: org.apache.commons.logging. Jawahar, I have read that link prior to me posting. It is similar to my issue but doesn't go any further than what I have troubleshooted. Since it doesn't affect any of the bobj server and the logs are not giving me any indication it's going to cause anything to crash.

This was a classpath problem and we did have another version of log4j in the classpath. Thanks Nathan Ryan !

Whats the root cause of Log4JLogger' cannot be found or is not , Whats the root cause of Log4JLogger' cannot be found or is not useable? org.​apache.commons.logging.impl.log4jlogger jar commons logging log4j2 commons  Root cause analysis is about digging beneath the surface of a problem. However, instead of looking for a singular “root cause,” we shift your problem-solving paradigm to reveal a system of causes. When using the Cause Mapping method, the word root in root cause analysis refers to causes that are beneath the surface.

Had this problem using log4j-2.x with commons-logging-1.2. Reverted back to log4j 1.2.x and all is fine with the world.

Whats the root cause of Log4JLogger' cannot be found or , Whats the root cause of Log4JLogger' cannot be found or is not useable? org.​apache.commons.logging.impl.log4jlogger jar commons logging vs log4j Another common cause of a zinc mineral deficiency is the lack or blockage of stomach acid. When we take an ant-acid or have low stomach acidity (HCL) we are effectively blocking our absorption of zinc. In many cases supplementation is crucial.

I see this error sometimes when I try to run a web application on tomcat 7 in my eclipse 3.6 . It occurs out of nowhere just by restarting eclipse.

After several (!) "clean all projects" and new deployments of the web app on the server the application runs again. Maybe someone else knows the exact "spell" to solve this mystery without trial and error?

Log4JLogger (Apache Commons Logging 1.2 API), public class Log4JLogger extends Object implements Log, Serializable The reason this logger is distinct from the 1.3 logger is that in version 1.2 of Log4J: in interface Log; Returns: true if debug is enabled in the underlying logger. A root cause tree is a graphic organizer that connects the foundation and the impact of an issue. When we use this tool to teach high school students about the impact culture has on violence, we start with a simple example “issue:” the common cold.

If you are providing an implementation for a logger, the implementation must define a constructor that takes a java.lang.String as an argument. Otherwise you get an "org.apache.commons.logging.LogConfigurationException: User-specified log class '...' cannot be found or is not useable." The faq page of the apache wiki states so.

Are you creating any specific project like web-services or spring, etc? If yes, then please analyze the project specific property files which would have a property in reference to the Logger, something like

<property name="logger">javax.servlet,org.apache.commons.logging</property>

if you have a java project with servlets.

Log4j – Migrating from Log4j 1.x, getRootLogger(). Calls to org.apache.log4j.Logger.getLogger that accept a LoggerFactory must remove the org.apache.log4j.spi.LoggerFactory  Romans 4:4-6 says that if we try to work for our salvation then God will owe us a reward, which means we will not be given the gift of salvation because salvation cannot be earned. Instead we must simply believe. Now to the one who works, his wage is not credited as a favor, but as what is due.

Caused By: java.lang.NoClassDefFoundError: org/apache/log4j , log4j.Logger class in your application's CLASSPATH. Simplest reason of this error is missing log4j.jar file. Since org.apache.log4j. The root cause of our problem is colonization, and this has never been touched upon in past talks. Foreign Minister Wang Yi: China's development has already given Japan very great benefits. But mentally, I don't think the Japanese side is fully prepared for this.

Java: How to configure log4j.properties correctly, import org.apache.log4j.Logger;. public class public static void main(String[] args) {. log.info("This is Logger Info") What is Logback.xml Logging Framework​? IMHO the root cause is putting poorly trained pilots in control of the aircraft. Remember, there have been previous runaway MCAS incidents but the symptoms were recognized by good pilots who knew how to fly properly, they turned off the MCAS and the rest of the flight continued safely. That’s what good pilots do.

Log4j Thread Deadlock - A Case Study, This case study describes the complete root cause analysis and resolution of This is now what we will discuss for the rest of the article. Log4JLogger.debug(​Log4JLogger.java:110) at org.apache.beehive.netui.util.logging. 9 Root Causes Of Disease 1) Confused Circadian Rhythms For hundreds of thousands of years, all of humanity rose, hunted, ate, fasted, and slept 2) Starving Gut Bacteria

Comments
  • may you provide whole stack trace?
  • This is likely a classpath problem. You probably have another version of log4j in your classpath, possibly hidden inside something else.
  • i did find one jar that had a diff version of log4j, however that may not be the last one, still searching...
  • Nathan, put your comment as answer i will accept it. it was another jar with a diff version of hte class in it. you the man !
  • we don't have our implementation of Logger so eliminate that being the issue. its a core-java application running in its own jvm
  • ok. Please give more info about your problem the stack-trace, minimal working code, etc