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. [嵌入式培训笔记]----Linux命令简介

    Linux文件系统的结构类似一棵树,是从一个树根生长出来的.树根叫做/.从树根长出很多分叉,就这么一直生长下去.我们使用Linux操作系统的时候总是落在某个分叉上.ls命令可以帮助我们查看当前分叉上所 ...

  2. JAVA常用数据结构API

    Quene

  3. python面试题包含基础和Linux操作以及数据库相关

    今天面试了一家公司,感觉表现的不是很好,记录一下面试的试题. python基础部分 python 是一门什么样的语言面向对象的语言有那些,python的面向对象和Java面向对象的区别 Python是 ...

  4. webstrom 配置eslint 自动修复错误

    1.展示效果 如何给vue项目添加eslint呢,如何自动修复呢? 先展示一下效果: 2.配置步骤 1.安装插件ESLint plugin webstrom 其实有个非常好用的插件,ESLint pl ...

  5. IceScrum敏捷开发工具的安装文档-官方最新版

    Welcome to the iceScrum iceScrum install guide. If you don’t want to manage your own iceScrum instal ...

  6. bzoj3000

    题解: n!k进制的位数 首先考虑n!十进制的位数 =log10(n!) 然后用阶乘近似公式 继而换底 得到答案 代码: #include<bits/stdc++.h> using nam ...

  7. 设置tableview 右侧 索引字体的大小

  8. 【dlbook】实践方法论

    [性能度量] 使用什么误差度量? 目标性能大致为多少? [默认的基准模型] 首先尝试分段线性单元,ReLU以及扩展. SGD一般是合理的选择,选加入动量的版本,衰减方法不一. 批标准化在优化出现问题时 ...

  9. ThinkPHP 连接数据库

    今天在配置连接Mysql 时出现了bool(false)的提示,仔细修改了mysql的密码,还是不对,发现问题应该数据库本身设置了前缀tb_本身的拼写错误和注释掉了 'DB_PREFIX'=>' ...

  10. Cannot forward after response has been committed 错误

    出现该错误的原因是:页面的跳转控制不好,换句话就是说程序的逻辑控制不好,导致了程序顺序执行的时候多次跳转到同一页面,有的程序员建议用多次使用return语句来返回,但是个人认为最好的还是自己要先理清页 ...