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 ...
随机推荐
- Hibernate中"二级缓存"配置
实体类 : package cn.happy.entity; public class Emp { private Integer empNo; private String empName; pub ...
- yii2手动添加图片处理插件Imagine
1.首先从官网下载yii2-imagine的拓展 下载地址:https://github.com/yiisoft/yii2-imagine 下载包名称:yii2-imagine-master 2.然后 ...
- 在线修改Schema
1. mysql5.5 或者 Mariadb 5.5 之前不需要将数据表中的所有记录复制到临时数据表的操作: a. 修改列名 b. 修改数值类型表示的长度(由INT(2)变成INT(3 ...
- element UI 中DateTimePicker 回传时间选择
之前在项目中用vue和element,日期和时间选择用的element2.0 的DateTimePicker 日期选择后提交没问题,在编辑页面通过后端返回时间字符串(敲黑板,这里是重点)绑定也没洒问题 ...
- 安装使用babel-polyfill。让IE支持es6
安装 npm install --save-dev babel-polyfill 使用 在你的代码头部加载babel-polyfill,注意一定要在你的代码开始前,第一个js文件的顶部.如果是vue在 ...
- 八、dbms_rls(实现精细访问控制)
1.概述 本报只适用于Oracle Enterprise Edition,它用于实现精细访问控制,并且精细访问控制是通过在SQL语句中动态增加谓词(WHERE子句)来实现的.通过使用ORACLE的精细 ...
- C++内存分配与对象构造的分离
在C++中,我们基本用new(delete)操作符分配(释放)内存.new操作符为特定类型分配内存,并在新分配的内存中构造该类型的一个对象.new表达式自动运行合适的构造函数来初始化每个动态分配的类类 ...
- zset类型以及其操作
sorted set类型 sorted sets类型以及其操作zset是set的一格升级版本,它在set的基础上增加了一格顺序属性,这一属性在添加元素的同时可以指定,每次指定后,zset会自动重新按照 ...
- 定位CPU高问题三把斧
1.top -H -p PID 查看对应进程的哪个线程占用CPU过高 2.printf "%x\n" tid 将需要的线程ID转换为16进制格式 3.jstack pid &g ...
- No style sheet with given id found错误
在chrome中打开html页面,报错No style sheet with given id found,解决方如下