【发布时间】:2017-06-14 00:30:21
【问题描述】:
我不知道我能做些什么来导致这种情况,因为我花在编程上的时间已经很长了,而且我已经忘记了我可能做了什么。但是现在当我加载 Eclipse 时,它会说:
The errors below were detected when validating the file "web-app_2_5.xsd" via the file "web.xml". In most cases these errors can be detected by validating "web-app_2_5.xsd" directly. However it is possible that errors will only occur when web-app_2_5.xsd is validated in the context of web.xml.
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'JDK 6 XML-related APIs'.
The entity name must immediately follow the '&' in the entity reference.
我的前几行 web.xml 看起来像这样。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
我了解到这可能是从中检索文件的服务器或缓存出现错误。我已经禁用并清除了缓存,据我所知,服务器与其他人正在使用的服务器相同,除非他们切换到 oracle.com url,但我还没有找到它。
任何想法将不胜感激。
【问题讨论】:
-
@Kev:也许我错过了什么,但这个问题与地理有什么关系?
-
@MichaelScheper - 阅读完整的关闭原因和接受的答案 - “特定时间”。这是一个特定于很短时间的问题,当时 Oracle 暂时破坏了托管 Eclipse 所依赖的各种 XML 模式的服务器。
-
@Kev:很公平。然而,我昨天遇到了同样的问题,我发现这篇文章很有帮助。它提示网络连接问题,结果证明是正确的,尽管该错误暗示存在格式问题。
-
@Kev 今天这里的问答帮助了我。
-
其他以前的 Sun Microsystems 架构 url 仍然存在问题,例如java.sun.com/xml/ns/j2eejava.sun.com/xml/ns/j2ee/web-app_2_4.xsd
标签: java xml jakarta-ee