Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Faceted Project Problem (Java Version Mismatch)" error message

Eclipse's "problems" tab is displaying this error:

Description: Java compiler level does not match the version of the installed Java project facet.
Resource: groupping
Path: [blank]
Location: Unknown
Type: Faceted Project Problem (Java Version Mismatch)

My pom.xml has this setting:

<plugins>     <plugin>         <groupId>org.apache.maven.plugins</groupId>         <artifactId>maven-compiler-plugin</artifactId>         <configuration>             <source>1.6</source>             <target>1.6</target>         </configuration>     </plugin> </plugins> 

Where else could the settings be mismatched?

like image 216
Blankman Avatar asked Feb 10 '10 20:02

Blankman


People also ask

How to solve Faceted project Problem?

The best way to change java level is to use the Project Facets properties panel as that will update both places at the same time. The " Project->Preferences->Project Facets " stores its configuration in this file, " org. eclipse. wst.

How do I fix Java version mismatch in eclipse?

Step 1: Uninstall your current version of Java. Step 2: Install a compatible version of Java. Compatible versions include: 1.8. 0.162, 1.8.

What is Project facet in Java?

Facets define characteristics and requirements for Java™ EE projects and are used as part of the runtime configuration. When you add a facet to a project, that project is configured to perform a certain task, fulfill certain requirements, or have certain characteristics.


1 Answers

Did you check your Project Properties -> Project Facets panel? (From that post)

A WTP project is composed of multiple units of functionality (known as facets).

The Java facet version needs to always match the java compiler compliance level.
The best way to change java level is to use the Project Facets properties panel as that will update both places at the same time.

WTP

The "Project->Preferences->Project Facets" stores its configuration in this file, "org.eclipse.wst.common.project.facet.core.xml", under the ".settings" directory.

The content might look like this

<?xml version="1.0" encoding="UTF-8"?> <faceted-project>   <runtime name="WebSphere Application Server v6.1"/>   <fixed facet="jst.java"/>   <fixed facet="jst.web"/>   <installed facet="jst.java" version="5.0"/>   <installed facet="jst.web" version="2.4"/>   <installed facet="jsf.ibm" version="7.0"/>   <installed facet="jsf.base" version="7.0"/>   <installed facet="web.jstl" version="1.1"/> </faceted-project> 

Check also your Java compliance level:

Java compliance level

like image 142
VonC Avatar answered Sep 16 '22 14:09

VonC