简体   繁体   English

在 Eclipse 中的每个“保存”时:org.eclipse.emf.ecore.xmi.FeatureNotFoundException

[英]On every 'save' in Eclipse: org.eclipse.emf.ecore.xmi.FeatureNotFoundException

In my Eclipse Oxygen, I get this error on every save.在我的 Eclipse Oxygen 中,每次保存时都会出现此错误。

From reading around, it seems to come from some version incompatibility in the Servlet standard used but I am not sure what is incompatible with what.通过阅读,它似乎来自所使用的 Servlet 标准中的某些版本不兼容,但我不确定什么与什么不兼容。

How do I fix this?我该如何解决?

An internal error occurred during: "Loading descriptor for project1.".在“正在加载 project1 的描述符”期间发生内部错误。 org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'init-param' not found. org.eclipse.emf.ecore.xmi.FeatureNotFoundException:未找到功能“init-param”。 (platform:/resource/project1/war/WEB-INF/web.xml, 72, 14) (平台:/resource/project1/war/WEB-INF/web.xml, 72, 14)

Here is a screenshot of a similar problem这是类似问题的屏幕截图

The problem is that theDTD specified in web.xml , generally specified in the web-app element, does not match the actual structure of the web.xml . The problem is that theDTD specified in web.xml , generally specified in the web-app element, does not match the actual structure of the web.xml . The error message points to the line (circled in the screenshot) in the web.xml document which is problematic.错误消息指向web.xml文档中存在问题的行(在屏幕截图中圈出)。

<?xml version = '1.0' encoding = 'UTF-8'?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

So either所以要么

  1. remove the DTD ( it is not necessary , but it is helpful to show your incompatibilities)删除 DTD( 这不是必需的,但它有助于显示您的不兼容性)
  2. update the web.xml to fit the DTD更新web.xml以适应 DTD
  3. update the DTD to fit the web.xml更新 DTD 以适应web.xml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM