Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Solution for Exception Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log

    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2.20k
    Comment on it

    If you face following exception while deploying your application in tomcat:

    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ApplicationName]]
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
            at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1897)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/Log
            at java.lang.Class.getDeclaredMethods0(Native Method)
            at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
            at java.lang.Class.getDeclaredMethods(Class.java:1855)
            at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:127)
            at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:287)
            at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:140)
            at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
            at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
            at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
            at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
            ... 10 more
    Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
            ... 24 more
    

    This means you are missing the commons-logging-1.0.4.jar in your application lib directory, you can either put the jar in application \WEB-INF\lib or in tomcat lib directory. Restart the tomcat server after putting the jar.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: