【发布时间】: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