Eclipse FeatureNotFoundException
Asked Answered
F

11

22

I have built my project with maven All builds successful and eclipse properties generation is also successful

But when I open the project in Eclipse 4, I am getting this error

An internal error occurred during: "Loading descriptor for SALYExplorer.".
org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'taglib' not found. (platform:/resource/SALYExplorer/src/main/webapp/WEB-INF/web.xml, 313, 10)

At that location I have some properties

Though the project runs smoothly and everything is fine, just while exploring the project in Navigation pane, Eclipse always throws this error box (quite annoying).

COde at that location

<taglib>
    <taglib-uri>xx.tld</taglib-uri>
    <taglib-location>/WEB-INF/tld/xx.tld</taglib-location>
</taglib>

and xx definations int it's file

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
     "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
<taglib>

  <tlib-version>1.0</tlib-version>
  <jsp-version>1.2</jsp-version>
.........
</taglib>
Freemason answered 6/8, 2012 at 8:10 Comment(2)
I have the same annoyance. I hope you don't mind my adding the stack trace.Delinda
sure. you can add. I am still looking for some solutionFreemason
P
26

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..

Paramagnet answered 14/3, 2013 at 9:21 Comment(1)
Worked for me. Unfortunately, Eclipse did not allow me to change the version of the Dynamic Web Module Facet directly. I had to muck around and change the config file, org.eclipse.wst.common.project.facet.core.xml, manually. The facet is internally named "jst.web".Bitterroot
V
6

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).

Viscardi answered 6/5, 2014 at 7:11 Comment(1)
This solution also works for resolving: Failed while installing JAX-RS (REST Web Services) 2.0. org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'web-app' is not found or is abstract.Amesace
B
4

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.

Boito answered 16/5, 2014 at 17:1 Comment(0)
A
1

For the time being if it's just the annoying Error Message that you want to fix, then as a short-term fix take a look at disabling validation here : Eclipse 'loading descriptor' takes ages

If the above does not work, an alternative would be to use AHK (Autohotkey) which would take slightly more work at your end. (I have been using an AHK script for a couple of years now to get rid of the Eclipse Error popups that I don't care about)

Eclipse Bug 198630 was raised almost 5 years back and in that there is a comment which has an almost identical error message as the OP. (The bug itself was finally closed as not being reproducible).

I have the following questions for you :

  1. Would it be possible for you to show us the Error log ? (To get at the error log you can either take a look at the Error Log View or by looking at the actual file : WORKSPACE_HOME/.metadata/.log. Please take a look at this for more detailed information. )
  2. Are you using any specific Server Adapters like WebLogic or Glassfish ?

I have the following recommendations :

  1. In the eclipse bug thread, the problem was fixed at least once by updating to a specific JST version. Hence, would it be possible for you to run an Eclipse update and see whether the problem is resolved ? (This can be done by going to Help -> Check for Updates)

  2. Would it be possible to try importing the project in Eclipse Indigo (instead of Juno, which you currently have) and see whether you can reproduce the problem ? (Eclipse Indigo downloads are available here and I believe you would need the Java EE version)

Affrica answered 6/8, 2012 at 9:55 Comment(3)
Cool. Please try the other suggestions that I made above ?Affrica
Added stack trace to the original question (if it gets approved by the reviewers). I'm on Juno and just updated, no joy.Delinda
Also, suspending all validators didn't help either.Delinda
G
0

I just got the same symptoms, with a web-app project using maven. In my case, was related to struts taglib tags in web.xml, and the project having a struts v1.2.9 dependency. I solved the problem by switching to struts v1.3.10. Don't ask why this solved the problem.

If you are in the same situation and you upgrade your struts dependency from 1.2.9 to 1.3.10, be sure to use at least dtd v2.3 in the DOCTYPE declaration of your web.xml:

!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"

or you'll get another problem (your webapp won't startup without an internet connection)

Hope this helps

Gilberto answered 24/8, 2012 at 0:33 Comment(3)
I am using 2.3 in web.xml; still same problemFreemason
with struts 1.3.10? I made the test: switching between struts 1.2.9 and 1.3.10 (and running eclipse's maven build or install). I get the annoying message with the former, and not with the later.Sweetener
I am having below lines at that line <taglib> <taglib-uri>xx.tld</taglib-uri> <taglib-location>/WEB-INF/tld/xx.tld</taglib-location> </taglib> and xx definations int it's file <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd"> <taglib> <tlib-version>1.0</tlib-version> <jsp-version>1.2</jsp-version>Freemason
D
0

I suspect that the problem is with Eclipse web Tools Platform and Java EMF Model. Here is an image of a list of plugins including Java EMF Model and JEM stuff from Eclipse Web Tools Platform: List of plugins including Java EMF Model and JEM stuff from Eclipse Web Tools Platform

https://stackoverflow.com/users/1503535/nitin-gurram, does your stack trace look like this?

!ENTRY org.eclipse.core.jobs 4 2 2012-09-28 12:10:00.554
!MESSAGE An internal error occurred during: "Loading descriptor for grch97.".
!STACK 0
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'taglib' not found. (platform:/resource/grch97/WEB-INF/web.xml, 891, 11)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
    at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.getResource(ProjectResourceSetImpl.java:1003)
    at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelResource(JEE5ModelProvider.java:169)
    at org.eclipse.jst.jee.model.internal.Web25ModelProvider.getModelObject(Web25ModelProvider.java:44)
    at org.eclipse.jst.jee.model.internal.JEE5ModelProvider.getModelObject(JEE5ModelProvider.java:215)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.loadProviders(AbstractMergedModelProvider.java:261)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.access$2(AbstractMergedModelProvider.java:255)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider$LoadModelsWorkspaceRunnable.run(AbstractMergedModelProvider.java:278)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.loadModel(AbstractMergedModelProvider.java:249)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.getMergedModel(AbstractMergedModelProvider.java:219)
    at org.eclipse.jst.jee.model.internal.common.AbstractMergedModelProvider.getModelObject(AbstractMergedModelProvider.java:139)
    at org.eclipse.jst.jee.ui.internal.navigator.Web25ContentProvider.getNewContentProviderInstance(Web25ContentProvider.java:69)
    at org.eclipse.jst.jee.ui.internal.navigator.LoadingJeeDDJob.run(LoadingJeeDDJob.java:50)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'taglib' not found. (platform:/resource/grch97/WEB-INF/web.xml, 891, 11)
    at org.eclipse.emf.ecore.xmi.impl.XMLHandler.reportUnknownFeature(XMLHandler.java:1985)
    at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleUnknownFeature(XMLHandler.java:1949)
    at org.eclipse.emf.ecore.xmi.impl.XMIHandler.handleUnknownFeature(XMIHandler.java:145)
    at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1893)
    at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1017)
    at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:81)
    at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:995)
    at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:706)
    at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:163)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
    at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:240)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1505)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1284)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
    at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.demandLoad(ProjectResourceSetImpl.java:811)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 14 more
Delinda answered 28/9, 2012 at 16:25 Comment(0)
K
0

I managed to fix this by removing the validator out of the .project file for each of the projects that had the issue.

Konikow answered 19/12, 2012 at 16:11 Comment(1)
Could you flesh out this answer a little more?Abie
B
0

I had a similar error using eclipse 4.3 (Kepler), maven 3.1.0, tomcat 6.0.37 and jdk7 (have also jre6 installed), and found a solution to fix it or at least to get rid of the tedious errors by configuring tomcat in eclipse.

In Preferences->Server-> Runtime Environments, define a new run time environment "Apache Tomcat 6.0" and select the jre6 installation from the installed JREs.

Then review the Targeted Runtimes in the project's properties. Apache Tomcat v6.0 should be associated with Java Runtime Environment v1.6 (if not yet defined press new and check that the selected JRE is a java 1.6 runtime).

Hope it helps

Barramunda answered 18/9, 2013 at 10:22 Comment(0)
A
0

I was able to update the project Java facet to 1.5 and the errors stopped.

Affixation answered 15/5, 2014 at 20:26 Comment(0)
G
0

In my case, this problem got resolved by using the version

org.eclipse.emf.ecore.xmi_2.10.2.v20150123-0348 and org.eclipse.emf.ecore.xmi.source_2.10.2.v20150123-0348 and org.eclipse.emf.ecore.xmi_2.10.2.v20150123-0348 and org.eclipse.emf.ecore.xmi.source_2.10.2.v20150123-0348 and org.eclipse.emf.common_2.10.1.v20150123-0348

jars in the build path. Earlier jars of old version were being used inspite of new version present.

Gerbil answered 2/1, 2018 at 6:33 Comment(0)
I
0

Right click on the project in Eclipse -> Build Path -> Configure Build Path -> Project Facets -> Uncheck Dynamic Web Module

Note: This approach is good as long you dont plan to run the web-app from within eclipse thru an embedded app server.

Invertebrate answered 11/3, 2019 at 2:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.