title: 'org.apache.commons.logging.impl.Log4JLogger' cannot be found
body: <p>In my Java Web Service, I am trying to write logs to windows event viewer, using log4j. I am using Eclipse as an IDE to deploy it using Tomcat. </p>
  
  <p><strong>this is my log4j.properties:</strong></p>
  
  <pre><code>log4j.rootLogger=DEBUG, CA, NTEventLog 
  
  
  log4j.rootLogger=DEBUG, CA, NTEventLog 
  
  
  #Console Appender 
  log4j.appender.CA=org.apache.log4j.ConsoleAppender 
  log4j.appender.CA.layout=org.apache.log4j.PatternLayout 
  log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n 
  
  #File Appender 
  log4j.appender.FA=org.apache.log4j.FileAppender 
  log4j.appender.FA.File=sample.log 
  log4j.appender.FA.layout=org.apache.log4j.PatternLayout 
  log4j.appender.FA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
  
  #Event Log Appender
  log4j.appender.NTEventLog=org.apache.log4j.nt.NTEventLogAppender
  log4j.appender.NTEventLog.source=ESB Web Services
  
  
  # Set the logger level of File Appender to WARN 
  log4j.appender.FA.Threshold = WARN
  </code></pre>
  
  <p><strong>this is my classpath:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;classpath&gt;
      &lt;classpathentry kind="src" path="src"/&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6"&gt;
          &lt;attributes&gt;
              &lt;attribute name="owner.project.facets" value="java"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"&gt;
          &lt;attributes&gt;
              &lt;attribute name="owner.project.facets" value="jst.web"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/&gt;
      &lt;classpathentry kind="lib" path="dom4j-1.6.1.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="jide-oss-2.1.1.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="jtds-1.2.6.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="poi-3.9-20121203.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="poi-ooxml-3.9-20121203.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="poi-ooxml-schemas-3.9-20121203.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="stax-api-1.0.1.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="xmlbeans-2.3.0.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="NTEventLogAppender.amd64.dll"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="NTEventLogAppender.dll"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="log4j-1.2.17.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="commons-logging-1.1.2.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="commons-logging-1.1.2-javadoc.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="commons-logging-1.1.2-sources.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="commons-logging-1.1.2-test-sources.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="commons-logging-1.1.2-tests.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="commons-logging-adapters-1.1.2.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="commons-logging-api-1.1.2.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="lib" path="commons-logging-tests.jar"&gt;
          &lt;attributes&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="output" path="build/classes"/&gt;
  &lt;/classpath&gt;
  </code></pre>
  
  <p>once I deploy the the code on tomcat the following </p>
  
  <p><strong>exception occur:</strong></p>
  
  <pre><code>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)
      at org.apache.axis2.deployment.DeploymentEngine.&lt;clinit&gt;(DeploymentEngine.java:76)
      at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
      at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>