org.springframework.beans.factory.BeanCreationException: Error creating bean with name “”userService”” defined in URL [file:/D:/WorkSpace/apache-tomcat-6.0.33/webapps/SingleUsers/WEB-INF/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named “”txAdvice”” must be of type [org.aopalliance.aop.Advice], but was actually of type [org.springframework.transaction.interceptor.TransactionInterceptor] |
|
配置文件:
<?xml version=”1.0″ encoding=”UTF-8″?> <beans xmlns=”http://www.springframework.org/schema/beans” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” 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-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd”> <!– 配置SessionFactory –> <bean id=”userDao” class=”com.singleusers.dao.impl.UserDaoImpl”> <bean id=”addUserAction” class=”com.singleusers.adduser.action.AddUserAction”> <!– 配置事物管理器 –> <!– AOP,那些包下面的类需要使用事物管理器 –> <!– 事物传播性配置 –> userService哪错了???急求解 |
|
有没有人遇到过这样的问题啊,求解,谢谢!
|
|
http://blog.csdn.net/nba_2011/article/details/6708812
解决了 jar包冲突 到jar包中去查看。 |
|
40分 |
Bean named “”txAdvice”” must be of type [org.aopalliance.aop.Advice],
这个异常表明引用的类型不对。。。估计是引用了aopalliance-alpha1.jar包中的Advice了。。 谢谢分享…LZ |
给分 |
|
谢谢LZ解决的我的问题,找了半天。
|