spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案
fire自带的包下有个spring1.2.6的jar包,而工程的jar包是2.0的。
解决方案:
1.将原配置文件的头schema方式换为DOCTYPE方式,原配置文件如下(非maven)
- <?xml version="1.0" encoding="UTF-8"?>
- <beans
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
- <bean id="helloWS" class="com.HelloWorld"/>
- <bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>
- <bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">
- <property name="serviceBean" ref="helloWS"/>
- <property name="serviceClass" value="com.IHelloWorld"/>
- <property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>
- </bean>
- </beans>
改成:
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
- <beans>
- <bean id="helloWS" class="com.HelloWorld"/>
- <bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>
- <bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">
- <property name="serviceBean" ref="helloWS"/>
- <property name="serviceClass" value="com.IHelloWorld"/>
- <property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>
- </bean>
- </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"错误解决方案的更多相关文章
- Spring—Document root element "beans", must match DOCTYPE root "null"分析及解决方法
网上很多人说要把applicationContex.xml文件中加上如下第二行的<!DOCTYPE/>标签,说明DTD.<?xml version="1.0" e ...
- maven项目,去除jar包中的不想要的依赖关系(Document root element "beans", must match DOCTYPE root "null". )
maven dependencies中并不会删除 以下方法maven dependencies中并不会删除,可能程序引入的时候,会去掉这种依赖(猜的) 解释: 就是说项目中要用到某一个a.jar包,通 ...
- Document root element "configuration", must match DOCTYPE root "mapper".
最近剛剛鼓搗mybatis , 第一個demo就出了問題.其實原因是因為將mapper中的頭copy到了configuration里去了 <?xml version="1.0" ...
- Tomcat启动报Error listenerStart错误 | "beans" 必须匹配 DOCTYPE 根 "null" | java.lang.reflect.MalformedParameterizedTypeException
maven打包发布工程时,发布上去却报错FAIL - Deployed application at context path /ch but context failed to start 在服务器 ...
- 文档根元素 "beans" 必须匹配 DOCTYPE 根 "null"
文档根元素 "beans" 必须匹配 DOCTYPE 根 "null" (2011-11-20 21:26:41) 转载▼ 标签: 杂谈 分类: spring- ...
- 【原】Spring整合Redis(第三篇)—盘点SDR搭建中易出现的错误
易错点01:Spring版本过低导致的错误[环境参数]Redis版本:redis-2.4.5-win32-win64Spring原来的版本:4.1.7.RELEASESpring修改后的版本:4.2. ...
- The content of element type "beans" must match "(description?,(import|alias|bean)*)
The content of element type "beans" must match "(description?,(import|alias|bean)*) - ...
- Spring整合Redis时报错:java.util.NoSuchElementException: Unable to validate object
我在Spring整合Redis时报错,我是犯了一个很低级的错误! 我设置了Redis的访问密码,在Spring的配置文件却没有配置密码这一项,配置上密码后,终于不报错了!
- Spring 异常 —— cvc-elt.1: Cannot find the declaration of element 'beans'
有个使用 Spring 的项目,运行时报错: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 5 ...
随机推荐
- 栈之括号匹配问题(java实现)
假设表达式中只允许两种括号:().{}:正确表达顺序为:()或{}或({})或{({}{})}的形势:如{(}或(})或({)}的表达形势均不对.算法的设计思想: 出现左括弧则进栈: 出现右括弧则首先 ...
- vuejs绑定img 的src
1.显示本地图片: <img src="../../common/images/auth-icon.png" /> 2.绑定变量: <img class=&q ...
- Web字体(链接)嵌入
下面是我最近在学习的两种字体嵌入方法 1.@font-face 使用@font-face可以这样做: @font-face{ font-family:"Garamod Premier Pro ...
- 014——数组(十四)array_reduce array_slice array_splice array_sum
<?php /** */ //array_reduce()递归的用回调函数递归的对数组元素进行处理,返回处理后的值 /*$arr=array(1,2,3,4,5); function func( ...
- C++ 进阶5 拷贝构造 深度复制 运算符重载
C++ 进阶5 拷贝构造 深度复制 运算符重载 20131026 例子: 运行环境是G++ 编译, /* * main.cpp * * Created on: 2013年10月26日 * ...
- C++设计模式之-模板模式
模板方法模式 在GOF的<设计模式:可复用面向对象软件的基础>一书中对模板方法模式是这样说的:定义一个操作中的算法骨架,而将一些步骤延迟到子类中.TemplateMethod使得子类可以不 ...
- Python的集合框架
Python内置了四种集合框架(list.tuple.dict.set) list:list是一种有序的集合 list里面的元素的数据类型也可以不同,list元素也可以是另一个list In [28] ...
- php-resque 简单的php消息队列
摘要: 消息队列是个好东西,各种×××MQ很多.然而看一下它们的文档,你得吓尿,什么鬼,我只是想用它触发个短信接口而已. 幸好也有简单的.这次是php-resque 安装 首先这货需要在linux下跑 ...
- react 生命周期图
1. react v16 版本生命周期 2. react v17 (还未发布), 生命周期将被改动,下面红框的部分就是会被删除的部分,注意调整!
- wxWidgets的配置
参考 :http://www.codeproject.com/Articles/11515/Introduction-to-wxWidgets 我是将D:\wxWidgets-3.0.1,中 编译过 ...