Eclipse FeatureNotFoundException
I ran into this error while trying to update a maven project in Eclipse (ALT+F5).
web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
and project facet
Dynamic Web Modul 3.0
Here is how I could fix it:
Removed all xmls-schema definition from the web-app
element
<web-app>
then update the maven project (ALT+F5).
Re-insert the schema definitions and re-update project (ALT+F5).
According to jsp_2_1.xsd included from web-app_2_5.xsd, taglib tag should be in jsp-config tag:
<xsd:complexType name="jsp-configType">
<xsd:annotation>
<xsd:documentation>
The jsp-configType is used to provide global configuration
information for the JSP files in a web application. It has
two subelements, taglib and jsp-property-group.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="taglib"
type="javaee:taglibType"
minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element name="jsp-property-group"
type="javaee:jsp-property-groupType"
minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:ID"/>
When I wrapped taglib in js-config, the error disappeared.
<jsp-config>
<taglib>
<taglib-uri>http://www.springframework.org/tags/form</taglib-uri>
<taglib-location>/WEB-INF/taglibs/spring-form.tld</taglib-location>
</taglib>
</jsp-config>
Previous parsers were probably more lenient. My config: Eclipse Luna, built-in maven 3.2.1, web.xml 2.5, Dynamic Web Project facet 2.5.
The problem is not the taglib at all, it's just a bad error description by Eclipse.
it is the project facet vs. web.xml dtd.. their versions must match!
if the web.xml says:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
but the project has a
"Dynamic Web Module 2.5"
then this error will occur.. change facet to 2.3 or web.xml to 2.5... in other words: they must match..