web-app_2_5.xsd在eclipse中验证web.xml时显示错误 [英] web-app_2_5.xsd showing errors when validating web.xml in eclipse

查看:1691
本文介绍了web-app_2_5.xsd在eclipse中验证web.xml时显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道我能做些什么导致这种情况因为我花在编程上的时间已经延长了,而且我已经忘记了我可能做过的事情。但现在当我加载Eclipse时,它说:

 通过验证文件web-app_2_5.xsd时检测到以下错误文件web.xml。在大多数情况下,可以通过直接验证web-app_2_5.xsd来检测这些错误。但是,只有在web.xml的上下文中验证web-app_2_5.xsd时才会出现错误。 
s4s-elt-character:除了'xs:appinfo'和'xs:documentation'之外的架构元素中不允许使用非空白字符。看到'JDK 6 XML相关API'。
实体名称必须紧跟实体参考中的&。

我的前几行web.xml就是这样。

 <?xml version =1.0encoding =UTF-8?> 
< web-app xmlns:xsi =http://www.w3.org/2001/XMLSchema-instance
xmlns =http://java.sun.com/xml/ns / javaeexmlns: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_IDversion =2.5>

我读过它可能是从检索文件的服务器出错,或者使用缓存。我已经禁用并清除了缓存,据我所知,除非他们切换到oracle.com网址并且我还没有找到它,否则其他人都在使用它。



任何想法都将不胜感激。

解决方案

参见 http://www.reddit.com/r/programming/comments/f9sxu 。问题是甲骨文。
我无法通过连接到互联网部署在SGES 2.1.1上。当我关闭它时,部署很慢,但成功。验证器似乎尝试刷新缓存模式并从schemaLocation URL下载它们。

  http://java.sun。 com / xml / ns / javaee / web-app_2_5.xsd 
GET /xml/ns/javaee/web-app_2_5.xsd ...
HTTP / 1.1 301永久移动到位置:
http://download.oracle.com/javase/6/docs/technotes/guides/xml/index.html

但是没有这样的架构!



我会尝试找到一些好的解决方案,但最好的方法是在Oracle中打人... ... / p>

编辑:此时固定(2010年1月27日,欧洲中部时间20:00),Oracle返回架构 - 您可以使用wget进行检查。浏览器被重定向到docs。尼斯: - )


I have no idea what I could've done to cause this because my time spent programming is stretched out and I've already forgotten what I might've done. But now when I load Eclipse it says:

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.

My first few lines of web.xml looks like so.

<?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">

I've read that it could be an error with the server where the file is being retrieved from, or with caching. I've disabled and cleared the cache and as far as I can tell the server is the same everyone else is using unless they switched to an oracle.com url and I haven't found it yet.

Any thoughts would be greatly appreciated.

解决方案

See http://www.reddit.com/r/programming/comments/f9sxu . The problem is Oracle, again. I cannot deploy on SGES 2.1.1 with the connection to the internet. When I turned it off, deploy was slow, but successful. It seems the validator tries to refresh cached schemas and to download them from the schemaLocation URLs.

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
GET /xml/ns/javaee/web-app_2_5.xsd ... 
HTTP/1.1 301 Moved Permanently to Location: 
  http://download.oracle.com/javase/6/docs/technotes/guides/xml/index.html

But there is no such schema!

I will try to find some good solution, but the best is maybe to punch up someone in Oracle ...

EDIT: It is fixed at this time (27.1.2010, 20:00 CET), Oracle returns the schema - you can check it with wget. Browsers are redirected to docs. Nice :-)

这篇关于web-app_2_5.xsd在eclipse中验证web.xml时显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆