Atomikos Forum

about raised -6 error

hi



i use atomikos 3.3.1 with spring & hibernate

there is one datasource and many hibernatesessionfactory

when the application runs for several hours, it throws the exception:

com.atomikos.datasource.ResourceException: resume for XID 202.102.108.21.tm2861200023202.102.108.21.tm606586 raised -6: the XA resource did not expect this command in the current context



i have disabled the threaded commit  with setting com.atomikos.icatch.threaded_2pc=false in the jta.properties

and should i set the hibernate a utocommit to false or not?



here is the datasource and hibernate config



<bean id="dataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean"
 init-method="init" destroy-method="close">
 <property name="uniqueResourceName">
 <value>plat</value>
 </property>
 
 <property name="xaDataSourceClassName">
 <value>${db.driverClassName}</value>
 </property>
 
 <property name="xaProperties">
 <props>
 <prop key="URL">${db.url}</prop>
 <prop key="user">${db.username}</prop>
 <prop key="password">${db.password}</prop>
 </props>
 </property>
 
 <property name="maxPoolSize">
 <value>${db.maxPoolSize}</value>
 </property>
 <property name="minPoolSize">
 <value>${db.minPoolSize}</value>
 </property>
 <property name="loginTimeout">
 <value>${db.loginTimeout}</value>
 </property>
 <property name="reapTimeout">
 <value>${db.reapTimeout}</value>
 </property>
       
 </bean>
 
 <bean id="platSessionFactory" lazy-init="false"
 class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
 <property name="dataSource">
 <ref bean="dataSource" />
 </property>
 <property name="entityInterceptor">
 <ref local="hibernateInterceptor" />
 </property>


 <property name="hibernateProperties">
 <props>
     
 <prop key="hibernate.dialect">
 ${db.Dialect.prefix}.${db.Dialect.suffix}
 </prop>
 <prop key="hibernate.query.substitutions">
 true '1', false '0'
 </prop>
 <prop key="hibernate.show_sql">false</prop>
 <prop key="hibernate.use_sql_comments">true</prop>
 <prop key="hibernate.format_sql">true</prop>
 <prop key="hibernate.connection.autocommit">false</prop>
 <prop key="hibernate.cglib.use_reflection_optimizer">
 true
 </prop>
 <prop key="hibernate.cache.use_query_cache">true</prop>
 
 <prop key="hibernate.cache.use_second_level_cache">
 true
 </prop>
 <prop key="hibernate.cache.provider_class">
 org.hibernate.cache.EhCacheProvider
 </prop>
 <prop key="hibernate.cache.provider_configuration_file_resource_path">
 classpath*:/ehcache_plat.xml
 </prop>
 <prop key="hibernate.default_schema">saas</prop>
 </props>
 </property>
 <property name="packagesToScan">
 <list>
 <value>com.jshx.saas.plat.entity</value>
 <value>com.jshx.saas.version.entity</value>
 <value>com.jshx.saas.member.entity</value>
 <value>com.jshx.saas.app.**.entity</value>
 <value>com.jshx.saas.extension.entity</value>
 <value>com.jshx.saas.customize.entity</value>
 <value>com.jshx.extend</value>
 </list>
 </property>
 </bean>


thanks a lot!
chenjian Send private email
Thursday, September 05, 2013
 
 

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

Other recent topics Other recent topics