Announcement Announcement Module
Collapse
No announcement yet.
Problem with WebLogicServerTransactionManagerFactoryBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with WebLogicServerTransactionManagerFactoryBean

    Hi,

    I'm fairly new to deploying on WebLogic but we're having a problem trying to deploy a Spring 2 based app on a new 9.2 container.

    The admin console displays the following error:

    org.springframework.beans.PropertyBatchUpdateExcep tion; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.springframework.transaction.jta.WebLogicJtaTra nsactionManager] to required type [javax.transaction.TransactionManager] for property 'transactionManager'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found

    The relevant stuff from my config file looks as follows:

    <bean id="transactionManager" class="org.springframework.transaction.jta.WebLogi cServerTransactionManagerFactoryBean" />

    <tx:annotation-driven transaction-manager="transactionManager"/>

    As far as I understand things, that's all I ought to have to do to get it to proxy my services (which are marked with the transactional annotation) through WL's JTA manager.

    Any tips/suggestions? If I don't hear anything I'll try and see whether it works proxying services the old-fashioned way

  • #2
    Is it possible to see the full stacktrace and the applicationContext.xml file? If you put it in [ code] [ /code] tags, it's soooooo much easier to read!

    Comment


    • #3
      Sorry for that, here's the complete stack trace from the WL console:

      Code:
      ERROR 02-08 14:22:22 Context initialization failed  (ContextLoader.java:205)
      org.springframework.beans.factory.BeanCreationException: Error creating bean wit
      h name 'org.springframework.transaction.interceptor.TransactionAttributeSourceAd
      visor': Cannot create inner bean '(inner bean)' while setting bean property 'tra
      nsactionInterceptor'; nested exception is org.springframework.beans.factory.Bean
      CreationException: Error creating bean with name '(inner bean)': Error setting p
      roperty values; nested exception is org.springframework.beans.PropertyBatchUpdat
      eException; nested PropertyAccessExceptions (1) are:
      PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Fail
      ed to convert property value of type [weblogic.transaction.internal.ServerTransa
      ctionManagerImpl] to required type [org.springframework.transaction.PlatformTran
      sactionManager] for property 'transactionManager'; nested exception is java.lang
      .IllegalArgumentException: No matching editors or conversion strategy found
      Caused by:
      org.springframework.beans.factory.BeanCreationException: Error creating bean wit
      h name '(inner bean)': Error setting property values; nested exception is org.sp
      ringframework.beans.PropertyBatchUpdateException; nested PropertyAccessException
      s (1) are:
      PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Fail
      ed to convert property value of type [weblogic.transaction.internal.ServerTransa
      ctionManagerImpl] to required type [org.springframework.transaction.PlatformTran
      sactionManager] for property 'transactionManager'; nested exception is java.lang
      .IllegalArgumentException: No matching editors or conversion strategy found
      Caused by:
      org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExc
      eption details (1) are:
      PropertyAccessException 1:
      org.springframework.beans.TypeMismatchException: Failed to convert property valu
      e of type [weblogic.transaction.internal.ServerTransactionManagerImpl] to requir
      ed type [org.springframework.transaction.PlatformTransactionManager] for propert
      y 'transactionManager'; nested exception is java.lang.IllegalArgumentException:
      No matching editors or conversion strategy found
      Caused by:
      java.lang.IllegalArgumentException: No matching editors or conversion strategy f
      ound
              at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(Ty
      peConverterDelegate.java:212)
              at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(Ty
      peConverterDelegate.java:127)
              at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrappe
      rImpl.java:774)
              at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrappe
      rImpl.java:607)
              at org.springframework.beans.AbstractPropertyAccessor.setPropertyValue(A
      bstractPropertyAccessor.java:49)
              at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(
      AbstractPropertyAccessor.java:74)
              at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(
      AbstractPropertyAccessor.java:57)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:965)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.createBean(AbstractAutowireCapableBeanFactory.java:417)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver
      .resolveInnerBeanDefinition(BeanDefinitionValueResolver.java:200)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver
      .resolveValueIfNecessary(BeanDefinitionValueResolver.java:116)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:950)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.populateBean(AbstractAutowireCapableBeanFactory.java:740)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.createBean(AbstractAutowireCapableBeanFactory.java:417)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
      ject(AbstractBeanFactory.java:245)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
      y.getSingleton(DefaultSingletonBeanRegistry.java:140)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:242)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:156)
              at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyC
      reator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:100)
              at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyC
      reator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:73)
              at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyC
      reator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:57)
              at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.
      postProcessAfterInitialization(AbstractAutoProxyCreator.java:255)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFa
      ctory.java:312)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1033)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBean
      Factory.createBean(AbstractAutowireCapableBeanFactory.java:421)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
      ject(AbstractBeanFactory.java:245)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
      y.getSingleton(DefaultSingletonBeanRegistry.java:140)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:242)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
      (AbstractBeanFactory.java:156)
              at 
      
      [snip]
      Hope thats of some help, I'll continue playing around with it.

      Comment


      • #4
        and a snip from the applicationContext.xml

        Code:
            <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName">
                    <value>myapp-pool</value>
                </property>
            </bean>
        
            <bean id="transactionManager" class="org.springframework.transaction.jta.WebLogicServerTransactionManagerFactoryBean" />
        
            <tx:annotation-driven transaction-manager="transactionManager"/>
        
            <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
                <property name="configLocation">
                    <value>classpath:/sqlMapConfig.xml</value>
                </property>
            </bean>
        
            <bean id="abstractRepository" class="org.springframework.orm.ibatis.support.SqlMapClientDaoSupport" abstract="true">
                 <property name="dataSource">
                    <ref local="dataSource"/>
                </property>
                <property name="sqlMapClient">
                    <ref local="sqlMapClient"/>
                </property>
            </bean>
        
            <bean id="countryRepository" class="com.mybusiness.repository.CountryRepositoryWithIbatis" parent="abstractRepository"/>
        
            <bean id="orderBookingService" class="com.mybusiness.DefaultOrderBookingService" />
        There are multiple repositories, all of which are controlled (by the app) through services and they define the transaction boundary. So, you have code that looks as follows:

        Code:
        @Transactional
        public class DefaultOrderBookingService implements OrderBookingService {
        It looks like WL is having trouble converting weblogic.transaction.internal.ServerTransactionMan agerImpl to org.springframework.transaction.PlatformTransactio nManager.

        Any tips? Is it a specific 9.2 issue? Seems a little weird if it is, thought weblogic/spring were a pretty happy couple.

        Thanks!

        Incidentally, I've also tried using the following:
        Code:
            <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName">
                    <value>myapp-pool</value>
                </property>
            </bean>
        
            <bean id="transactionManager" class="org.springframework.transaction.jta.WebLogicJtaTransactionManager" />
        
            <tx:annotation-driven transaction-manager="transactionManager"/>
        
            <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
                <property name="configLocation">
                    <value>classpath:/sqlMapConfig.xml</value>
                </property>
            </bean>
        
            <bean id="abstractRepository" class="org.springframework.orm.ibatis.support.SqlMapClientDaoSupport" abstract="true">
                 <property name="dataSource">
                    <ref local="dataSource"/>
                </property>
                <property name="sqlMapClient">
                    <ref local="sqlMapClient"/>
                </property>
            </bean>
        But with the above context I see the following:
        Code:
        ERROR 02-08 14:51:04 Context initialization failed  (ContextLoader.java:205)
        org.springframework.beans.factory.BeanCreationException: Error creating bean wit
        h name 'org.springframework.transaction.interceptor.TransactionAttributeSourceAd
        visor': Cannot create inner bean '(inner bean)' while setting bean property 'tra
        nsactionInterceptor'; nested exception is org.springframework.beans.factory.Bean
        CreationException: Error creating bean with name '(inner bean)': Cannot resolve
        reference to bean 'transactionManager' while setting bean property 'transactionM
        anager'; nested exception is org.springframework.beans.factory.BeanCreationExcep
        tion: Error creating bean with name 'transactionManager' defined in class path r
        esource [applicationContext.xml]: Error setting property values; nested exceptio
        n is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAcce
        ssExceptions (1) are:
        PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Fail
        ed to convert property value of type [org.springframework.transaction.jta.WebLog
        icJtaTransactionManager] to required type [javax.transaction.TransactionManager]
         for property 'transactionManager'; nested exception is java.lang.IllegalArgumen
        tException: No matching editors or conversion strategy found
        Caused by:
        org.springframework.beans.factory.BeanCreationException: Error creating bean wit
        h name '(inner bean)': Cannot resolve reference to bean 'transactionManager' whi
        le setting bean property 'transactionManager'; nested exception is org.springfra
        mework.beans.factory.BeanCreationException: Error creating bean with name 'trans
        actionManager' defined in class path resource [applicationContext.xml]: Error se
        tting property values; nested exception is org.springframework.beans.PropertyBat
        chUpdateException; nested PropertyAccessExceptions (1) are:
        PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Fail
        ed to convert property value of type [org.springframework.transaction.jta.WebLog
        icJtaTransactionManager] to required type [javax.transaction.TransactionManager]
         for property 'transactionManager'; nested exception is java.lang.IllegalArgumen
        tException: No matching editors or conversion strategy found
        Caused by:
        org.springframework.beans.factory.BeanCreationException: Error creating bean wit
        h name 'transactionManager' defined in class path resource [applicationContext.x
        ml]: Error setting property values; nested exception is org.springframework.bean
        s.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
        PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Fail
        ed to convert property value of type [org.springframework.transaction.jta.WebLog
        icJtaTransactionManager] to required type [javax.transaction.TransactionManager]
         for property 'transactionManager'; nested exception is java.lang.IllegalArgumen
        tException: No matching editors or conversion strategy found
        Caused by:
        ... (repeating)
        Last edited by pingles; Feb 8th, 2007, 08:51 AM.

        Comment


        • #5
          I have the same problem
          Did anybody solved this issue ?

          Comment

          Working...
          X