beans.xml 文件过早结束
Premature end of file on beans.xml
内容xml
<?xml version="1.0" encoding="UTF-8"?>
<beans 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/beans_1_1.xsd"
version="1.1" bean-discovery-mode="none">
</beans>
它开始失败并出现错误:
Caused by: org.xml.sax.SAXParseException; Premature end of file
将您的 xsd 文件位置更改为:http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/beans_1_1.xsd
。似乎他们强制执行 https,并添加了不支持的重定向。
由于 Oracle 站点最近非常不稳定,我以本地 beans_1_1.xsd 结尾,与 XML 文件捆绑在一起:
<?xml version="1.0" encoding="UTF-8"?>
<beans 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
./beans_1_1.xsd"
version="1.1" bean-discovery-mode="none">
</beans>
内容xml
<?xml version="1.0" encoding="UTF-8"?>
<beans 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/beans_1_1.xsd"
version="1.1" bean-discovery-mode="none">
</beans>
它开始失败并出现错误:
Caused by: org.xml.sax.SAXParseException; Premature end of file
将您的 xsd 文件位置更改为:http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/beans_1_1.xsd
。似乎他们强制执行 https,并添加了不支持的重定向。
由于 Oracle 站点最近非常不稳定,我以本地 beans_1_1.xsd 结尾,与 XML 文件捆绑在一起:
<?xml version="1.0" encoding="UTF-8"?>
<beans 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
./beans_1_1.xsd"
version="1.1" bean-discovery-mode="none">
</beans>