"Cannot install project facet" error while creating a project?
I resolved this one. The solution is I have to goto to the ".settings" folder which is at the project location and deleted "org.eclipse.wst.common.project.facet.core.xml" file and restarted the process again. This time it worked. Thanks for your help.
There is no need to delete the file and recreating again. Instead navigate org.eclipse.wst.common.project.facet.core.xml file in ur project on eclipse and change its installed facet tag with whatever version desired.
I have the same challenges but using GlassFish5 that I downloaded from Oracle and I manually configure my org.eclipse.wst.common.project.facet.core.xml
from .settings
folder to:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 5"/>
<fixed facet="jst.web"/>
<fixed facet="java"/>
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="4.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.8"/>
<installed facet="glassfish.web" version="5"/>
</faceted-project>
and include the following files generated from Dynamic Web Project using TomEE, now my .settings
folder has the following files:
.jsdtscope
org.eclipse.jdt.core.prefs
org.eclipse.wst.common.component
org.eclipse.wst.common.project.facet.core.xml
org.eclipse.wst.jsdt.ui.superType.container
org.eclipse.wst.jsdt.ui.superType.name
then, I edit my project's .classpath
to point to the location of JAR file I'm using, since I'm using GlassFish5, this is my configuration:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_261">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="C:/glassfish5/glassfish/lib/javaee.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
Finally, when I go back to Eclipse IDE, I refresh my Project Explorer and walah!
I hope it helps for others with the same challenges.