日期:2014-05-20  浏览次数:20836 次

ssh事务整合xfire
下个项目要用webservice,费了好大的劲整合起来(ssh_xfire),可是一看还没有整合spring的事务!于是开始做,可是遇到问题了!发布的时候:
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Line 11 in XML document from ServletContext resource [/WEB-INF/classes/applicationContext-transactionManager.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
--------------------------------------------------------------------------最开始不加applicationContext-transactionManager.xml 这个的时候是可以用的!百度了下 找到一个解决方案
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">加上这句可以了,但是
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:aop="http://www.springframework.org/schema/aop"
  xmlns:tx="http://www.springframework.org/schema/tx"
  xsi:schemaLocation="
  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
  http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
这句不能引入任何元素才行,但这是事务,不引入下面的该如何配置呢?
=========================================================
等待高手给点指教!

------解决方案--------------------
你是不是直接在service层直接开了web server服务,