I use WLS 10.3
I had this transaction manager configured
and it is ok.Code:<bean id="transactionManager" autowire="byName" class="org.springframework.orm.hibernate3.HibernateTransactionManager" > <property name="sessionFactory"><ref bean="hibernatepadmeFactory"/></property> </bean>
Now since business logic changed and i need to use distributed transactions
i replaced the transaction manager with:
but i get thisCode:<bean id="transactionManager" autowire="byName" class="org.springframework.transaction.jta.WebLogicJtaTransactionManager"> <property name="transactionManagerName" value="javax.transaction.TransactionManager" /> </bean>
Code:at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: org.springframework.beans.factory.BeanCreationException: Error creati ng bean with name 'transactionManager' defined in class path resource [ /test/factory/spring/spring-config-service.xml]: Initializat ion of bean failed; nested exception is org.springframework.beans.TypeMismatchEx ception: Failed to convert property value of type [org.springframework.transacti on.jta.WebLogicJtaTransactionManager] to required type [javax.transaction.Transa ctionManager] for property 'transactionManager'; nested exception is java.lang.I llegalArgumentException: Cannot convert value of type [org.springframework.trans action.jta.WebLogicJtaTransactionManager] to required type [javax.transaction.Tr ansactionManager] for property 'transactionManager': no matching editors or conv ersion strategy found at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb ject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr y.getSingleton(DefaultSingletonBeanRegistry.java:221) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe an(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory. preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finish BeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refres h(AbstractApplicationContext.java:381) at org.springframework.context.support.ClassPathXmlApplicationContext.<i nit>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<i nit>(ClassPathXmlApplicationContext.java:83)
Can someone give me a hint why ?
Thanks


Reply With Quote