Atomikos Forum

glassfish datasource problem

I am trying to migrate from jpaTransactionManager to jtaTransactionManager using atomikos in a spring project.

When i use atomikosDataSourceBean with jdbc properties everything is fine.

But when i want to use glassfish jndi resource i got the exception below

Caused by: java.lang.IllegalStateException: Cannot convert value of type [com.sun.gjc.spi.jdbc40.DataSource40] to required type [javax.sql.XADataSource] for property 'xaDataSource': no matching editors or conversion strategy found

I configure atomikosDataSourceBean as

<bean id="dataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean"
 init-method="init" destroy-method="close">
    <property name="xaDataSource" ref="jpaDatasource"/>
</bean>

jpaDatasource is configured with com.mysql.jdbc.jdbc2.optional.MysqlXADataSource


Any help is appreciated
hakans Send private email
Friday, October 07, 2011
 
 
Seems like the runtime config finds 'com.sun.gjc.spi.jdbc40.DataSource40' instead of XADataSource. So it looks like you are not really pointing to the XA implementation? I would double-check the JNDI config if possible.
Guy Pardon Send private email
Friday, October 07, 2011
 
 
My datasource configuration is below.

 <jdbc-connection-pool datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource" res-type="javax.sql.XADataSource" allow-non-component-callers="true" name="jdbc/sparrowPool">
      <property name="URL" value="jdbc:mysql://localhost:3306/deveopment"></property>
      <property name="Password" value="123456"></property>
      <property name="User" value="root"></property>
      <property name="pinGlobalTxToPhysicalConnection" value="true"></property>
</jdbc-connection-pool>
hakans Send private email
Monday, October 10, 2011
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics