fire自带的包下有个spring1.2.6的jar包,而工程的jar包是2.0的。

解决方案:

1.将原配置文件的头schema方式换为DOCTYPE方式,原配置文件如下(非maven)

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans
  3. xmlns="http://www.springframework.org/schema/beans"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
  6. <bean id="helloWS" class="com.HelloWorld"/>
  7. <bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>
  8. <bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">
  9. <property name="serviceBean" ref="helloWS"/>
  10. <property name="serviceClass" value="com.IHelloWorld"/>
  11. <property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>
  12. </bean>
  13. </beans>

改成:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
  3. <beans>
  4. <bean id="helloWS" class="com.HelloWorld"/>
  5. <bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>
  6. <bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">
  7. <property name="serviceBean" ref="helloWS"/>
  8. <property name="serviceClass" value="com.IHelloWorld"/>
  9. <property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>
  10. </bean>
  11. </beans>

2.maven环境下建pom.xml的xfire调整以下:

<!-- xfire 1.2.6 -->
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-spring</artifactId>
<version>1.2.6</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
</exclusions>
</dependency>

重新发布即可

spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案的更多相关文章

  1. Spring—Document root element "beans", must match DOCTYPE root "null"分析及解决方法

    网上很多人说要把applicationContex.xml文件中加上如下第二行的<!DOCTYPE/>标签,说明DTD.<?xml version="1.0" e ...

  2. maven项目,去除jar包中的不想要的依赖关系(Document root element "beans", must match DOCTYPE root "null". )

    maven dependencies中并不会删除 以下方法maven dependencies中并不会删除,可能程序引入的时候,会去掉这种依赖(猜的) 解释: 就是说项目中要用到某一个a.jar包,通 ...

  3. Document root element "configuration", must match DOCTYPE root "mapper".

    最近剛剛鼓搗mybatis , 第一個demo就出了問題.其實原因是因為將mapper中的頭copy到了configuration里去了 <?xml version="1.0" ...

  4. Tomcat启动报Error listenerStart错误 | "beans" 必须匹配 DOCTYPE 根 "null" | java.lang.reflect.MalformedParameterizedTypeException

    maven打包发布工程时,发布上去却报错FAIL - Deployed application at context path /ch but context failed to start 在服务器 ...

  5. 文档根元素 "beans" 必须匹配 DOCTYPE 根 "null"

    文档根元素 "beans" 必须匹配 DOCTYPE 根 "null" (2011-11-20 21:26:41) 转载▼ 标签: 杂谈 分类: spring- ...

  6. 【原】Spring整合Redis(第三篇)—盘点SDR搭建中易出现的错误

    易错点01:Spring版本过低导致的错误[环境参数]Redis版本:redis-2.4.5-win32-win64Spring原来的版本:4.1.7.RELEASESpring修改后的版本:4.2. ...

  7. The content of element type "beans" must match "(description?,(import|alias|bean)*)

    The content of element type "beans" must match "(description?,(import|alias|bean)*) - ...

  8. Spring整合Redis时报错:java.util.NoSuchElementException: Unable to validate object

    我在Spring整合Redis时报错,我是犯了一个很低级的错误! 我设置了Redis的访问密码,在Spring的配置文件却没有配置密码这一项,配置上密码后,终于不报错了!

  9. Spring 异常 —— cvc-elt.1: Cannot find the declaration of element 'beans'

    有个使用 Spring 的项目,运行时报错: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 5 ...

随机推荐

  1. 第六天 vim编辑的使用和Xmanager远程工具的使用

    1.1 vim主要模式介绍,vim命令模式 使用命令 vim [file name] 有三种主要模式:命令模式.编辑模式.命令行模式 在vim中主要使用快捷键进行操作,详见:http://www.cn ...

  2. docker nginx 问题

    '经常不启动docker会遇到如下问题 启动docker pull * 会报错  1. 安装步骤: 解决办法:命令输入:docker logout 再次执行:docker pull * 2. 执行ru ...

  3. ZOJ 2599 Graduated Lexicographical Ordering ★(数位DP)

    题意 定义两个数的比较方法,各位数字之和大的数大,如果数字和相等则按字典序比较两个数的大小.输入n,k,求:1.数字k的排名:2.排名为k的数. 思路 算是一类经典的统计问题的拓展吧~ 先来看第一问. ...

  4. C# RedisRateLimiter

    public class RedisRateLimiter { private static Logger LOG = LogManager.GetLogger("redis-limiter ...

  5. I/O复用服务器端+回声客户端

    并发服务器的第二种实现方法:I/O复用 服务器端: #include <arpa/inet.h> #include <unistd.h> #include <algori ...

  6. JS之BOM和DOM(来源、方法、内容、应用)

    1.Javascript组成(此文为转载) JavaScript的实现包括以下3个部分: 1)核心(ECMAScript):描述了JS的语法和基本对象. 2)文档对象模型 (DOM):处理网页内容的方 ...

  7. hdu 6040 Hints of sd0061(stl: nth_element(arr,arr+k,arr+n))

    Hints of sd0061 Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others ...

  8. DB2导入导出数据

    1.导出表数据到txt文件: export to /brcb_edp/data_public_edp/file/CCDM/file/FILE_CCDM_DR_CARD_CUST_DET.txt of ...

  9. core文件介绍

    原文链接:http://team.eyou.com/?p=27 如有侵犯您的版权,请联系windeal12@qq.com linux下,产生core文件,和不产生core文件的条件: 当我们的程序崩溃 ...

  10. Linux系统在启动过程中mbr主引导程序被破坏的解决方案

    首先,mbr主引导程序被破坏是指系统在启动过程中,磁头找不到/boot分区(windows的启动分区在c盘). 1)下面我们模拟主引导分区被破坏的情况:(在启动分区划分446M的存储大小) 2)重启( ...