Announcement Announcement Module
Collapse
No announcement yet.
org.springframework.web.context.ContextLoaderListe ner not found Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.web.context.ContextLoaderListe ner not found

    I am getting a class not found error for the following class in the error. I searched on the forum on other thread and the solution there was to put spring-web jar in class path. But I already havr that jar on classpath. Still the error is coming.


    Error configuring application listener of class org.springframework.web.context.ContextLoaderListe ner

    Please help....

  • #2
    org.springframework.web.context.ContextLoaderListe ner not found

    Hello Harish,

    The error is given because one of the spring libraries (.jar) is not on your classpath. If you add it the error will disappear. How to do this depends on your specific setup. How are you building your application, are you building it from eclipse or are you using a build tool such as ant or maven? Are your dependencies read from a directory on your hard disc or are they retrieved from a maven repository on the internet? What application server (jboss, websphere, tomcat etc) are you using and what version? What version of spring are you using? If you answer these questions i can help you more. One thing you can already try is the tool jarsbrowser (at cmarton.free.fr/jarsbrowser/) to find what classes are in the jars in your application server.

    Best wishes
    Marc Kropholler

    Comment


    • #3
      Hello Marc,
      I am using Eclipse Indigo with Springframework jar files version 3.2.3 Release. The jars are located on my harddisk. I am using tomcat version 7.0.34.
      Regards,
      Harish Ingle

      Comment


      • #4
        ContextLoaderListener

        Hello Harish,

        Sorry for the late reply. The class ContextLoaderListener is in the file spring-web-3.2.3.RELEASE.jar in the spring 3.2.3 distribution zip file. I haven't tested it but I am almost sure that adding this jar file to the \lib directory in the tomcat 7 directory will put the classes in it on your classpath and will make the error disappear. You may receive a similar error for a different class that is used by spring, such as log4j. Adding extra jars to the lib directory will in the end solve this. The following link can be usefull as it contains links to all spring dependencies:

        http://mvnrepository.com/artifact/or.../3.2.2.RELEASE

        Does this information solve your problem?

        Best wishes
        Marc

        Comment


        • #5
          Hello Marc,

          Thank you for your reply. I also felt that a jar was missing and most probably it was commons-logging jar. I found a basic web application using spring-mvc with all jars properly added and was able to run my application. Does maven does not also download the dependecies of spring jars. I was assuming that they did..... Here is the link for the tutorial

          http://www.raistudies.com/spring/spr...se-annotation/

          Thanks again,
          Harish

          Comment


          • #6
            Hello Harish,

            Yes maven usually downloads these dependencies. It also depends on the configuration in the build script but normally it should. Usually maven builds a .war or .ear file and the required dependencies are inside these file so you have less configuration for the server.

            Best wishes
            Marc Kropholler

            Comment

            Working...
            X