Dynamic Web Module 3 0 requires Java 1 6 newer
This issue happens either if you import existing maven project in your workspace or create new maven project using dynamic web module version 3.0. This is maven Java EE configuration problem. To solve this issue please follow below steps:
- Correct your java compiler version. Right click project –> Properties –> Java Compiler
- Correct your build path to use Java 1.6 version as below. (Note: If you haven’t configure Java 1.6 yet or not sure how to install new JDK in eclipse please follow this tutorial)
- Correct you project Facets. Right click project –> Properties –> Project Facets and choose Java 1.6 version
- Add below plugin to your build:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build>
- If you haven’t corrected your web.xml yet then please replace your web-app with below to use 3.0.
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
- Now Right click project –> Maven –> Update Project
This should fix the issue Dynamic Web Module 3 0 requires Java 1 6 or newer