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 ...
随机推荐
- Python之如何删除pandas DataFrame的某一/几列
删除pandas DataFrame的某一/几列: 方法一:直接del DF['column-name'] 方法二:采用drop方法,有下面三种等价的表达式: 1. DF= DF.drop('co ...
- Ansible 小手册系列 二十(经常遇到的问题)
(1). 怎么为任务设置环境变量? - name: set environment shell: echo $PATH $SOME >> /tmp/a.txt environment: P ...
- request.getPathInfo() 方法的作用
request.getPathInfo(); 这个方法返回请求的实际URL相对于请求的serlvet的url的路径.(个人理解.) 比如,有一个Servlet的映射是这样配置的: <servle ...
- Rsync安装和配置
一.Rsync简介 1.1什么是Rsync Rsync是一款快速的,开源的,多功能的,可以实现全量和增量的远程和本地的数据同步和数据备份的工具. 全量的概念是:全部备份. 增量的概念是:差异化备份.对 ...
- Prism 4 文档 ---第4章 模块化应用程序开发
模块化应用程序是指将一个应用程序拆分成一系列的可以组合的功能单元.一个客户端模块封装了应用程序的一部分,并且通常是一系列相关的关注点.它可以包含一个相关的组件的集合,就像用户界面,应用程序功能,和一些 ...
- 添加git 忽略文件
在使用Git的过程中,我们喜欢有的文件比如日志,临时文件,编译的中间文件等不要提交到代码仓库,这时就要设置相应的忽略规则,来忽略这些文件的提交. Git 忽略文件提交的方法 有三种方法可以实现忽略Gi ...
- iOS笔记杂记
Google Mobile Ads SDK更新至7.2.1不能编译,添加依赖库QuartzCore.framework后正常编译 imageName会把image缓存到手机内存里,不适合大量图片浏览会 ...
- leetCode之Median of Two Sorted Arrays
[题目描述] There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of ...
- Flask-WTF表单
Web表单 Web 表单是 Web 应用程序的基本功能. 它是HTML页面中负责数据采集的部件.表单有三个部分组成:表单标签.表单域.表单按钮.表单允许用户输入数据,负责HTML页面数据采集,通过表单 ...
- WAF的实现
文章来源:http://danqingdani.blog.163.com/blog/static/1860941952014101723845500/ 本篇文章从WAF产品研发的角度来YY如何实现一款 ...