当前位置: 代码迷 >> J2EE >> spring 小弟我用的声明式事务,在用了@Transactional(propagation=Propagation.NOT_SUPPORTED),ecache等
  详细解决方案

spring 小弟我用的声明式事务,在用了@Transactional(propagation=Propagation.NOT_SUPPORTED),ecache等

热度:284   发布时间:2016-04-21 23:41:04.0
spring 我用的声明式事务,在用了@Transactional(propagation=Propagation.NOT_SUPPORTED),ecache等
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'cacheManagerFactory' must be of type [org.springframework.transaction.PlatformTransactionManager], but was actually of type [net.sf.ehcache.CacheManager]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:360)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:249)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
at com.oms.services.impl.OmsOrderHistoryServiceImpl$$EnhancerByCGLIB$$abfd3c38.save(<generated>)
at com.oms.services.impl.OmsDistributionRangeServiceImpl.save(OmsDistributionRangeServiceImpl.java:38)
at com.oms.services.impl.OmsDistributionRangeServiceImpl$$FastClassByCGLIB$$a52a512d.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
at com.oms.services.impl.OmsDistributionRangeServiceImpl$$EnhancerByCGLIB$$96cef88a.save(<generated>)
at com.oms.struts.action.AddressAction.save(AddressAction.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)
at 
spring ehcahe

------解决方案--------------------
Bean named 'cacheManagerFactory' must be of type [org.springframework.transaction.PlatformTransactionManager], but was actually of type [net.sf.ehcache.CacheManager]
  相关解决方案