簡體   English   中英

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

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

在我的 Eclipse Oxygen 中,每次保存時都會出現此錯誤。

通過閱讀,它似乎來自所使用的 Servlet 標准中的某些版本不兼容,但我不確定什么與什么不兼容。

我該如何解決?

在“正在加載 project1 的描述符”期間發生內部錯誤。 org.eclipse.emf.ecore.xmi.FeatureNotFoundException:未找到功能“init-param”。 (平台:/resource/project1/war/WEB-INF/web.xml, 72, 14)

這是類似問題的屏幕截圖

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 . 錯誤消息指向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">

所以要么

  1. 刪除 DTD( 這不是必需的,但它有助於顯示您的不兼容性)
  2. 更新web.xml以適應 DTD
  3. 更新 DTD 以適應web.xml

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM