Hobione's Weblog

Living & Breathing in Web 2.0 Era

org.springframework.web.context.ContextLoaderListener

Error: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

The Spring projects has many modules.

  1. Spring Web MVC (spring-webmvc.jar)
  2. Spring Aop (spring-aop.jar)
  3. Spring Beans (spring-beans.jar)
  4. Spring Context (spring-context.jar)
  5. Spring Core (spring-core.jar)
  6. Spring Dao (spring-dao.jar)
  7. Spring Hibernate (spring-hibernate3.jar)
  8. Spring Ibatis (spring-ibatis.jar)
  9. Spring Jca (spring-jca.jar)
  10. Spring Jdbc (spring-jdbc.jar)
  11. Spring Jdo (spring-jdo.jar)
  12. Spring Jms (spring-jms.jar)
  13. Spring Jms (spring-jpa.jar)
  14. Spring Jmx (spring-jmx.jar)
  15. Spring Portlet (spring-portlet.jar)
  16. Spring Remoting (spring-remoting.jar)
  17. Spring Struts (spring-struts.jar)
  18. Spring Support (spring-support.jar)
  19. Spring Toplink (spring-toplink.jar)
  20. Spring Web (spring-web.jar)
  21. Spring Aspects (spring-aspects.jar)

Solution: My project was missing Spring-web.jar  Two ways to fix this.
1. Add Spring-web.jar to the WEB-INF/lib dir
2. Add a dependency tag to the pom.xml file (preferred).  At this time I am using Spring 2.5.4

    <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>2.5.4</version>
        </dependency>

April 5, 2009 - Posted by HobiOne | Spring Framework | | 2 Comments

2 Comments »

  1. Hello, it continuous with same error. I added spring-web.jar in WEF-INF/lib of my proyect, and it didn’t go. And then, I added

    org.springframework
    spring-web
    2.5.0

    in pom.xml, but it didn’t go. Can you help me? Thank, regards

    Elena

    Comment by Elena | May 13, 2009 | Reply

    • What is the error? What IDE are you using? Make sure do a clean build. Close IDE and restart, clear cache etc.
      - Hobi

      Comment by HobiOne | May 13, 2009 | Reply


Leave a comment