How to fix Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse

Cannot change version of project facet Dynamic Web Module to 3.0

Today while converting Dynamic Web Project to Maven project I got below Error:

What steps I’ve performed to fix this?

In order to fix this first thing I did is to change Project Facets settings.

  1. Right click on Project in Eclipse
  2. Click on Properties
  3. Click on Project Facets Tab
  4. Change value from 3.1 to 3.0 for Dynamic Web Module as mentioned in below image.

Eclipse Project facets - Dynamic Web Module

Did it fix my problem? Unfortunately No

I was not able to apply setting as Apply and OK button was grayed out with error msg: Cannot change version of project facet Dynamic Web Module to 3.0.

I was literally stuck at this point, then How did I fix this issue?

Step-1

  • Go to your Eclipse Workspace location
  • If you don’t find location then
    • Right click on project
    • Click on Resource
    • Go to your Location

Find Workspace Resource Properties - Crunchify Workspace

Step-2

Go to location and open file <workspace>/.settings/org.eclipse.wst.common.project.facet.core.xml.

Find Eclipse org.eclipse.wst.common.project.facet.core.xml Path

Step-3

Modify version for jst.web property to 3.0 from 3.1 and save file.

Step-4

  • Refresh project
    • Right click on Project
    • Refresh (F5)
  • Clean project
    • Click on Project
    • Select Clean
  • Again
    • Right-click on project name
    • Click on Maven
    • Update project
  • Now checkout Project Facets screen again and error should be gone for you.

There will not be any error for Dynamic Web Module - Crunchify