Eclipse Language Servers: There is ‘1‘ error in ‘javaee_7.xsd‘解决办法

今天在Eclipse导入项目时,web-inf出现红叉,百度无果后自行研究。
出现错误的文件是web.xml

<web-app
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
    version="4.0"
>

错误是:

There is ‘1’ error in ‘javaee_7.xsd’.
schema_reference.4: Failed to read schema document ‘platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd’, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.).

有一篇国外的博客上说,这是Eclipse的一个错误,从21年3月份就出现了。

出现这个错误的时候,打开XSD文件可以看到一个错误一个警告
错误
警告:schema_reference.4: Failed to read schema document 'platform:/plugin/org.eclipse.xsd/cache/www.w3.org/2001/xml.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. jakartaee_9.xsd /lemminx-cache/https/jakarta.ee/xml/ns/jakartaee line 52 Language Servers
尝试在xml.xsd文件中定义xml:lang属性,但是这里无法检索sml.xsd,并出现错误、

解决方法:
一,等待带有修复程序的Eclipse版本

二,禁用LemMinx验证:
在windows->preferences 中,选择XML(Wild Web)
点击Validation 将Enable validation的选中取消即可
在这里插入图片描述

  • 36
    点赞
  • 66
    收藏
    觉得还不错? 一键收藏
  • 16
    评论
评论 16
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值