Results 1 to 2 of 2

Thread: Spring is ignoring commons-logging.jar

  1. #1
    Join Date
    Mar 2012
    Posts
    3

    Default Spring is ignoring commons-logging.jar

    I am getting following stacktrace while deploying my web application on Tomcat v6. commons-logging.jar is already included in my class path but still Spring is ignoring it.


    org.springframework.beans.BeanInstantiationExcepti on : Could not instantiate bean class [org.springframework.web.context.support.XmlWebAppl icationContext]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:141)
    at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:104)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:251)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4705)

  2. #2
    Join Date
    Jan 2006
    Location
    Seattle, Washington
    Posts
    467

    Default

    You didn't say HOW you're including the jar in your classpath. You should put this jar in the WEB-INF/lib directory of your WAR file.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •