【问题标题】:Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf.xml无法从 URL 位置导入 bean 定义 [classpath:META-INF/cxf/cxf.xml
【发布时间】:2015-06-08 22:25:13
【问题描述】:

您好,我在 fuse 容器中运行骆驼项目时遇到错误

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: 配置问题: 无法从 URL 位置导入 bean 定义 [classpath:quote-endpoints.xml] 违规资源:URL [bundle://251.0:0/META-INF/spring/applicationContext.xml];嵌套异常是 org.springframework.beans.factory.parsing.BeanDefinitionParsingException:配置问题:

无法从 URL 位置 [classpath:META-INF/cxf/cxf.xml] 导入 bean 定义

违规资源:OSGi 资源[classpath:quote-endpoints.xml|bnd.id=251|bnd.sym=null];嵌套异常是 org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from OSGi resource[classpath:META-INF/cxf/cxf.xml|bnd.id=251|bnd.sym=null];嵌套异常是 java.io.FileNotFoundException: OSGi 资源[classpath:META-INF/cxf/cxf.xml|bnd.id=251|bnd.sym=null] 无法解析为 URL,因为它不存在

任何帮助表示赞赏

谢谢

【问题讨论】:

    标签: jboss apache-camel jbossfuse fuseesb


    【解决方案1】:

    检查 POM.xml 文件中 cxf 的版本。很可能,您的项目可能有不受支持的 cxf 版本。

    【讨论】:

      【解决方案2】:

      是的 - 有两个 xml 文件 -

      applicationContext.xml 导入 quote-endpoints.xml

      <import resource="classpath:quote-endpoints.xml" />
      

      quote-endpoints.xml impor resource="classpath:META-INF/cxf/cxf.xml" /> 请看下文

      xsi:schemaLocation="
                   http://www.springframework.org/schema/beans 
                   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                   http://camel.apache.org/schema/spring 
                   http://camel.apache.org/schema/spring/camel-spring.xsd
                   http://camel.apache.org/schema/cxf 
                   http://camel.apache.org/schema/cxf/camel-cxf.xsd
                   http://cxf.apache.org/transports/http/configuration 
                   http://cxf.apache.org/schemas/configuration/http-conf.xsd">
      
          <import resource="classpath:META-INF/cxf/cxf.xml" />
      

      【讨论】:

        【解决方案3】:

        检查您的 xml 文件并删除那些 CXF 导入。多年来不再需要它们。例如,查找带有 META-INF/cxf/cxf.xm 和类似名称的任何内容并将其删除。

        【讨论】:

        • 嗨克劳斯,quote-endpoints.xml 进口资源="classpath:META-INF/cxf/cxf.xml" /> 请看下面
        • 是删除
        猜你喜欢
        • 2013-07-22
        • 2012-08-20
        • 2017-04-09
        • 2012-05-03
        • 1970-01-01
        • 1970-01-01
        • 2016-05-03
        • 2015-08-09
        • 2011-09-01
        相关资源
        最近更新 更多