Atomikos Forum |
|
Hi,
I am getting below error message when i am creating JtaTransactionManager bean by injecting AtomikosTransactionManager, AtomikosUserTransaction. Can you please anyone help? I have added below jars into my Tomcat lib and application classpath. transactions-jta-3.9.3.jar transactions-jms-3.9.3.jar transactions-jdbc-3.9.3.jar transactions-api-3.9.3.jar transactions-3.9.3.jar atomikos-util-3.9.3.jar Added below configuration into spring config.xml. <bean id="AtomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init" destroy-method="close"> <!-- when close is called, should we force transactions to terminate or not? --> <property name="forceShutdown" value="false" /> </bean> <bean id="AtomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp"> <property name="transactionTimeout" value="300" /> </bean> <!-- Overwriting PlatformTransactionManager: soluminaTransactionManager (JDBC Transaction Manager) uses this --> <bean id="transactionManagerTest" class="org.springframework.transaction.jta.JtaTransactionManager" depends-on="AtomikosTransactionManager,AtomikosUserTransaction"> <property name="transactionManager" ref="AtomikosTransactionManager" /> <property name="userTransaction" ref="AtomikosUserTransaction" /> <property name="allowCustomIsolationLevels" value="true" /> </bean> Error Message: Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.atomikos.icatch.jta.UserTransactionManager] to required type [javax.transaction.TransactionManager] for property 'transactionManager'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.atomikos.icatch.jta.UserTransactionManager] to required type [javax.transaction.TransactionManager] for property 'transactionManager': no matching editors or conversion strategy found at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) ... 23 more |