【问题标题】:Loading descriptor error in Eclipse Neon 3在 Eclipse Neon 3 中加载描述符错误
【发布时间】:2017-11-07 04:44:08
【问题描述】:

我在 stackoverflow 中发现了几个问题,都在问同样的问题,但没有一个有合适的解决方案

我在 Eclipse 中创建了一个 Demo 动态项目。现在它显示错误消息

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)

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

<?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 中的实际值周围没有预期 任何 空格。
  • 谢谢。它对我有用。您能否将其作为答案,以便我可以接受。它可能对其他人非常有帮助

标签: java eclipse eclipse-neon


【解决方案1】:

可能是 Eclipse 工具过于严格,并且在 res-auth 中的实际值周围没有任何空格。尝试更改它,使开始和结束标记之间只有单词“Container”。

【讨论】:

    猜你喜欢
    • 2012-10-02
    • 1970-01-01
    • 2014-05-25
    • 2013-02-09
    • 2012-07-31
    • 2013-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多