bitronix.TM to spring.jtaTM

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bitronix.TM to spring.jtaTM

jfc7fk
I set up bitronix in Tomcat 6 according to the instruction on this page
: http://docs.codehaus.org/display/BTM/Tomcat13

I then configured spring like this, in the applicationContext.xml file :

    <bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName" value="java:comp/env/dataSource"/>
    </bean>

    <bean id="btmTransactionManager" class=
"org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName" value="java:comp/UserTransaction"/>
    </bean>

    <bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager"
      depends-on="btmTransactionManager">
        <property name="transactionManager" ref="btmTransactionManager" />
        <property name="userTransaction" ref="btmTransactionManager"  />
  </bean>


and I end up with this error:

 org.springframework.beans.TypeMismatchException: Failed to convert
property value of type [bitronix.tm.BitronixTransactionManager] to
required type [javax.transaction.TransactionManager] for property
'transactionManager'; nested exception is
java.lang.IllegalArgumentException: Cannot convert value of type
[bitronix.tm.BitronixTransactionManager] to required type
[javax.transaction.TransactionManager] for property
'transactionManager': no matching editors or conversion strategy found



I have tried a few different configurations to get and insert the
bitronix.tm.BitronixTransactionManager into the JtaTransactionManager
bean, all with the same message that it can't covert from the bitronix
type object to the javax type; which doesn't make any sense to me
because the first implements the second.

What am I missing?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

aroundy.vcf (249 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bitronix.TM to spring.jtaTM

Ludovic Orban
Administrator
This looks like a classpath problem to me.

Please check that you don't have geronimo-jta_1.0.1B_spec.jar (or jta.jar) and btm-x.x.x.jar in your WEB-INF/lib but only in TOMCAT_HOME/lib.

2009/11/17 Adam Roundy <[hidden email]>
I set up bitronix in Tomcat 6 according to the instruction on this page : http://docs.codehaus.org/display/BTM/Tomcat13

I then configured spring like this, in the applicationContext.xml file :

  <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName" value="java:comp/env/dataSource"/>
  </bean>

  <bean id="btmTransactionManager" class= "org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName" value="java:comp/UserTransaction"/>
  </bean>

  <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"
    depends-on="btmTransactionManager">
      <property name="transactionManager" ref="btmTransactionManager" />
      <property name="userTransaction" ref="btmTransactionManager"  />
 </bean>


and I end up with this error:

org.springframework.beans.TypeMismatchException: Failed to convert property value of type [bitronix.tm.BitronixTransactionManager] to required type [javax.transaction.TransactionManager] for property 'transactionManager'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [bitronix.tm.BitronixTransactionManager] to required type [javax.transaction.TransactionManager] for property 'transactionManager': no matching editors or conversion strategy found



I have tried a few different configurations to get and insert the bitronix.tm.BitronixTransactionManager into the JtaTransactionManager bean, all with the same message that it can't covert from the bitronix type object to the javax type; which doesn't make any sense to me because the first implements the second.

What am I missing?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email