0

I have included org.springframework.spring-webmvc-4.3.1.RELEASE and tried with 3.2.4.RELEASE even though i am getting this error.

POM

<build>
    <plugins>
        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
        </plugin>
    </plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.1.RELEASE</version>
</dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>3.2.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>3.2.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>3.2.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jpa</artifactId>
        <version>1.4.1.RELEASE</version>
    </dependency>       <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>3.1.0.RELEASE</version>
    </dependency>
</dependencies>

error

SEVERE: Servlet /SpringMVCTutorial threw load() exception
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

Any one help

EDIT I have added Maven Dependency in Deployment assembly, I'm getting this error now

ERROR

SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://maven.apache.org/POM/4.0.0]
Offending resource: ServletContext resource [/WEB-INF/SpringMVC-servlet.xml]

Project Structure

1 Answers1

0

If your IDE is eclipse, Try the following. Source

You need to add the "Maven Dependency" in the Deployment Assembly

1. right click on your project and choose properties. 2. click on Deployment Assembly. 3. click add 4. click on "Java Build Path Entries" 5. select Maven Dependencies" 6. click Finish. 7. Rebuild and deploy again

Community
  • 1
  • 1
AchillesVan
  • 4,156
  • 3
  • 35
  • 47