KItis
KItis

Reputation: 5646

Need Explanation java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

This is not a question. I am trying to find reason for following behavior.

I am developing simple web application involving technologies like Spring, Hibernate and Struts2.

I use Maven 3 as the build tool. When I am starting to run the project using eclipse Juno release, I'm getting following error:

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

But in the pom.xml I have added the dependency for spring web framework and when I list the jars in eclipse, I can see this Context loader file is there.

But when I add the following plugin configuration to pom.xml , this exception is not thrown:

<plugin>
    <version>2.9</version>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>
    <configuration>
        <wtpversion>2.0</wtpversion>
    </configuration>
</plugin>

I just want to find a reason for this behavior. Thanks in advance for any clue.

I have integrated following maven plugins in to maven.

enter image description here

Upvotes: 2

Views: 688

Answers (1)

NimChimpsky
NimChimpsky

Reputation: 47290

add the maven dependencies to your deployment assembly

Upvotes: 1

Related Questions