Atomikos Forum

com.atomikos.datasource.ResourceException: error

Hi,

I'm getting the following error:

com.atomikos.datasource.ResourceException: XA resource 'DataSourceA': resume for XID '31302E302E35302E3131372E746D30303030313030303539:31302E302E35302E3131372E746D31' raised -5: invalid arguments were given for the XA operation


My spring configuration file:



    <bean
        class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />

    <tx:jta-transaction-manager />

    <tx:annotation-driven transaction-manager="transactionManager"
        proxy-target-class="true" />

    <bean id="AtomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager"
        init-method="init" destroy-method="close">
        <property name="forceShutdown" value="false" />
    </bean>

    <bean id="AtomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp">
        <property name="transactionTimeout" value="300" />
    </bean>

    <bean id="transactionManager"
        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>


    
    
    <bean id="dataSourceA" class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init" destroy-method="close">
    <property name="uniqueResourceName"><value>DataSourceA</value></property>
    <property name="xaDataSourceClassName"><value>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</value></property>
    <property name="xaProperties">
        <props>
        <prop key="databaseName">companyA</prop>
        <prop key="serverName">localhost</prop>
        <prop key="port">3306</prop>
        <prop key="user">root</prop>
        <prop key="password">XXX</prop>
        <prop key="url">jdbc:mysql://localhost:3306/xxx</prop>
        </props>
    </property>
    <property name="minPoolSize"><value>1</value></property>
</bean>

    <bean id="entityManagerFactory"
        class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
          <property name="dataSource" ref="dataSourceA" />
        <property name="persistenceXmlLocation">
            <value>classpath*:persistence.xml</value>
        </property>
        <property name="persistenceUnitName" value="PersistenceUnitA" />
        <property name="jpaVendorAdapter">
            <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
        </property>
        <property name="packagesToScan"
            value="com.xxx.model, com.xxx.shared.model" />
        <property name="jpaProperties">
         
            <props>
                <prop key="hibernate.transaction.manager_lookup_class">
                    com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup
                </prop>
                <prop key="hibernate.dialect">
                    org.hibernate.dialect.MySQL5Dialect
                </prop>
                <prop key="hibernate.max_fetch_depth">3</prop>
                <prop key="hibernate.jdbc.fetch_size">50</prop>
                <prop key="hibernate.jdbc.batch_size">10</prop>
                <prop key="hibernate.show_sql">true</prop>
                <prop key="javax.persistence.transactionType">jta</prop>
                <prop key="hibernate.hbm2ddl.auto">update</prop>
                
            </props>
        </property>
    </bean>
urbanleg Send private email
Wednesday, January 01, 2014
 
 

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

Other recent topics Other recent topics