Exception:cannot change the configuration while the transaction manager is running

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

Exception:cannot change the configuration while the transaction manager is running

Btmuser
Hi
 
This is about the exception in BTM while Tomcat startup.

Iam using btm along with hibernate and spring.
BTM transaction manager is configured using spring's JTA TX Manager and 2 XA datasources are for the DB2 databases. Also in the hibernate sessionfactory configuration, i have specified the BTMTransactionManagerLookup class name as hibernate property.

While server startup it's giving me the following exception.


Error creating bean with name 'distributedTxManager'<this is spring's JTA TX manager> defined in class path resource [com/spark/service/conf/service-config.xml]: Cannot resolve reference to bean 'bitronixTransactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'btmConfig' defined in class path resource [com/spark/service/conf/service-config.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (3) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'serverId' threw exception; nested exception is java.lang.IllegalStateException: cannot change the configuration while the transaction manager is running
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'logPart1Filename' threw exception; nested exception is java.lang.IllegalStateException: cannot change the configuration while the transaction manager is running
PropertyAccessException 3: org.springframework.beans.MethodInvocationException: Property 'logPart2Filename' threw exception; nested exception is java.lang.IllegalStateException: cannot change the configuration while the transaction manager is running.

Kindly help me in resolving the above problem.
Thanks in advance.

Thanks
PC
Reply | Threaded
Open this post in threaded view
|

Re: Exception:cannot change the configuration while the transaction manager is running

Ludovic Orban
Administrator
You probably forgot to add a depends-on="btmConfig" attribute to the transaction manager's bean definition in the Spring config. Carefully read this page: http://docs.codehaus.org/display/BTM/Spring+Framework#SpringFramework-Step3%3AConfigureBTMbeans
Reply | Threaded
Open this post in threaded view
|

Re: Exception:cannot change the configuration while the transaction manager is running

Btmuser

Ludovic Orban wrote
You probably forgot to add a depends-on="btmConfig" attribute to the transaction manager's bean definition in the Spring config. Carefully read this page: http://docs.codehaus.org/display/BTM/Spring+Framework#SpringFramework-Step3%3AConfigureBTMbeans
Thanks Ludovic for the reply.

I already mentioned the btmConfig dependency in "bitronixTransactionManager" bean definition.

TransactionManager instance is getting created by PoolingDataSource thru sessionFactory(hibernate) before the btm log files creation.

Still facing the same problem. Please find the below stackTrace:

TransactionManagerServices.getTransactionManager() line: 40 --> This is creating new transactionManager instance
XAPool.getNotAccessible() line: 225
XAPool.getConnectionHandle(boolean) line: 68
XAPool.getConnectionHandle() line: 58
PoolingDataSource.getConnection() line: 116
LocalDataSourceConnectionProvider.getConnection() line: 81
SettingsFactory.buildSettings(Properties) line: 84
Configuration.buildSettings(Properties) line: 2009
Configuration.buildSessionFactory() line: 1292
LocalSessionFactoryBean.newSessionFactory(Configuration) line: 805
LocalSessionFactoryBean.buildSessionFactory() line: 745
LocalSessionFactoryBean(AbstractSessionFactoryBean).afterPropertiesSet() line: 134

Kindly help.

Thanks
PC

Reply | Threaded
Open this post in threaded view
|

Re: Exception:cannot change the configuration while the transaction manager is running

Ludovic Orban
Administrator
In reply to this post by Btmuser
Aren't you running BTM 1.2 ? If that's the case (looks like it according to the line numbers you posted) then you should make sure the TM starts before any resource is created.

I strongly advise you to upgrade to the latest 1.3 tough.

2009/1/30 Btmuser <[hidden email]>

Thanks Ludovic for the reply.

I already mentioned the btmConfig dependency in "bitronixTransactionManager"
bean definition.

TransactionManager instance is getting created by PoolingDataSource thru
sessionFactory(hibernate) before the btm log files creation.

Still facing the same problem. Please find the below stackTrace:

TransactionManagerServices.getTransactionManager() line: 40     --> This is
creating new transactionManager instance
XAPool.getNotAccessible() line: 225
XAPool.getConnectionHandle(boolean) line: 68
XAPool.getConnectionHandle() line: 58
PoolingDataSource.getConnection() line: 116
LocalDataSourceConnectionProvider.getConnection() line: 81
SettingsFactory.buildSettings(Properties) line: 84
Configuration.buildSettings(Properties) line: 2009
Configuration.buildSessionFactory() line: 1292
LocalSessionFactoryBean.newSessionFactory(Configuration) line: 805
LocalSessionFactoryBean.buildSessionFactory() line: 745
LocalSessionFactoryBean(AbstractSessionFactoryBean).afterPropertiesSet()
line: 134

Kindly help.

Thanks
PC

Btmuser wrote:
>
> Hi
>
> This is about the exception in BTM while Tomcat startup.
>
> Iam using btm along with hibernate and spring.
> BTM transaction manager is configured using spring's JTA TX Manager and 2
> XA datasources are for the DB2 databases. Also in the hibernate
> sessionfactory configuration, i have specified the
> BTMTransactionManagerLookup class name as hibernate property.
>
> While server startup it's giving me the following exception.
>
>
> Error creating bean with name 'distributedTxManager'<this is spring's JTA
> TX manager> defined in class path resource
> [com/spark/service/conf/service-config.xml]: Cannot resolve reference to
> bean 'bitronixTransactionManager' while setting bean property
> 'transactionManager'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'btmConfig' defined in class path resource
> [com/spark/service/conf/service-config.xml]: Error setting property
> values; nested exception is
> org.springframework.beans.PropertyBatchUpdateException; nested
> PropertyAccessExceptions (3) are:
> PropertyAccessException 1:
> org.springframework.beans.MethodInvocationException: Property 'serverId'
> threw exception; nested exception is java.lang.IllegalStateException:
> cannot change the configuration while the transaction manager is running
> PropertyAccessException 2:
> org.springframework.beans.MethodInvocationException: Property
> 'logPart1Filename' threw exception; nested exception is
> java.lang.IllegalStateException: cannot change the configuration while the
> transaction manager is running
> PropertyAccessException 3:
> org.springframework.beans.MethodInvocationException: Property
> 'logPart2Filename' threw exception; nested exception is
> java.lang.IllegalStateException: cannot change the configuration while the
> transaction manager is running.
>
> Kindly help me in resolving the above problem.
> Thanks in advance.
>
> Thanks
> PC
>
>

--
View this message in context: http://www.nabble.com/Exception%3Acannot-change-the-configuration-while-the-transaction-manager-is-running-tp21743584p21747004.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.


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

   http://xircles.codehaus.org/manage_email