在 Eclipse Neon 3 中加载描述符错误

Loading descriptor error in Eclipse Neon 3

我在 Whosebug 中发现了几个问同样问题的问题,但其中 none 个有正确的解决方案

我在 Eclipse.Now 中创建了一个演示动态项目,它显示一条错误消息

An internal error occurred during: "Loading descriptor for DemoServlet.".
org.eclipse.emf.ecore.xmi.IllegalValueException: Value '
Container
' is not legal. (platform:/resource/DemoServlet/WebContent/WEB-INF/web.xml, 15, 
14)

此错误消息在一段时间后一次又一次地显示,但我能够 运行 项目 correctly.The 描述如下

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
 http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" 
 version="3.1">
 <display-name>DemoServlet</display-name>

 <resource-ref>

 <res-ref-name>
   jdbc/javaDB
 </res-ref-name>
 <res-type>
   javax.sql.DataSource
 </res-type>
 <res-auth>
    Container
 </res-auth>
 </resource-ref>
 <welcome-file-list>
   <welcome-file>Login.html</welcome-file>
 </welcome-file-list>
 </web-app>

如何从 eclipse 中消除这个错误?

可能是 Eclipse 工具过于严格,不希望在 res-auth 中的实际值周围有 任何 空格。尝试更改它,以便只有单词 "Container" 位于开始和结束标记之间。