Announcement Announcement Module
Collapse
No announcement yet.
Log4J error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Log4J error

    i m unable to run a webapp this error is comming


    Code:
    pr 7, 2011 4:55:37 PM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener
    java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator
    	at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:70)
    	at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:151)
    	at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:51)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Caused by: java.lang.ClassNotFoundException: org.apache.log4j.PropertyConfigurator
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
    	... 18 more

    ...
    ...
    ...

    Code:
    Apr 7, 2011 4:55:37 PM org.apache.catalina.core.ApplicationContext log
    INFO: Shutting down Log4J
    Apr 7, 2011 4:55:37 PM org.apache.catalina.core.StandardContext listenerStop
    SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.util.Log4jConfigListener
    java.lang.NoClassDefFoundError: org/apache/log4j/LogManager
    	at org.springframework.util.Log4jConfigurer.shutdownLogging(Log4jConfigurer.java:114)
    	at org.springframework.web.util.Log4jWebConfigurer.shutdownLogging(Log4jWebConfigurer.java:169)
    	at org.springframework.web.util.Log4jConfigListener.contextDestroyed(Log4jConfigListener.java:55)
    	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3836)
    	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4366)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4282)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Caused by: java.lang.ClassNotFoundException: org.apache.log4j.LogManager
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
    	... 19 more
    I have log4j in my classpath..
    Do i need to incude the jar in lib folder also.. If I do them I get some other error related to loggin which is specific to application.

    please help..

  • #2
    Do you have log4j on the classpath form your web app, e.g. web-inf/lib or do you have 2 instances of log4j in your classpath?

    Comment


    • #3
      nope.. single instance in classpath..
      webinf/lib doesnt have any.

      Comment


      • #4
        Where is it in your classpath?

        Try putting a copy in web-inf/lib

        Comment

        Working...
        X