beans.xml上的文件过早结束

时间:2019-06-24 07:39:11

标签: java java-ee jboss javabeans

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

1 个答案:

答案 0 :(得分:0)

将xsd文件位置更改为:http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/beans_1_1.xsd。看来他们实施了https,并添加了重定向,但不支持该重定向。