部署期间无法通过weblogic12中的spring模式文档读取spring bean xml

时间:2019-05-30 16:03:44

标签: java spring jax-rs weblogic12c

虽然部署应用程序bean.xml文件无法使用xsd验证架构,但是在启动服务器时却遇到了错误。

下面是错误日志:

<May 30, 2019 8:21:20 PM IST> <Warning> org.jboss.weld.Bootstrap <cozw7dev21007> <AdminServer> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1559227880134> <BEA-000000> <WELD-001208 Warning when validating file:/X:/base-domain-12/servers/AdminServer/tmp/_WL_user/gbrs-ws/pk9aag/war/WEB-INF/beans.xml@26 against xsd. schema_reference.4: Failed to read schema document 'http://cxf.apache.org/schemas/jaxrs.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>.>

下面是Spring bean配置文件的定义。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xmlns:cxf="http://cxf.apache.org/core"
xsi:schemaLocation="
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd" 
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

     http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
     http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
     http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

我在尝试通过Intellij使用xsd时收到了相同的错误。 我曾尝试在Intellij设置中定义xsd:“设置>语言和框架>架构和DTD”的外部架构和DTD。 我已经在此处定义了它,但是位置不正确。