每當我發送帶有JmsTemplate的消息時,都會拋出異常。 (我用Spring 3.0.5.RELEASE)。我無法找到不兼容的類!TransactionSynchronization.afterCompletion中的IncompatibleClassChangeError
春瓶在我的類路徑:
錯誤日誌:
springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(136) | TransactionSynchronization.afterCompletion threw exception
java.lang.IncompatibleClassChangeError: Class org.springframework.jms.connection.JmsResourceHolder does not implement the requested interface org.springframework.transaction.support.ResourceHolder
at org.springframework.transaction.support.ResourceHolderSynchronization.afterCompletion(ResourceHolderSynchronization.java:105)
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:133)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:904)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:879)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:707)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:314)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
at ...
爲什麼使用spring-jdbc,spring-hibernate3和spring-dao 2.0.8版本? – 2013-03-24 11:41:12
我爲它的HibernateDaoSupport使用spring-hibernate3(它的最後一個版本是2.0.8)! – united 2013-03-24 14:32:25
嘗試使用spring-orm而不是spring-hibernate3。參見http://forum.springsource.org/showthread.php?82841-Does-spring-hibernate3-work-with-Spring-3-0。 – 2013-03-24 20:12:55