-
Jul 31st, 2008, 11:16 AM
#1
tx:jta-transaction-manager and JBoss 4.0.5
Hi,
I have a problem trying to deploy an application using : Spring 2.5.2 on JBoss 4.0.5
In my classes I use at 'Transactional' annotation so I tried the following :
1.
<tx:jta-transaction-manager />
<tx:annotation-driven />
I got the following : Error creating bean with name 'transactionManager': Invocation of init method
failed; nested exception is java.lang.IllegalStateException: No JTA
UserTransaction available - specify either 'userTransaction' or
'userTransactionName' or 'transactionManager' or 'transactionManagerName' at
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.ini
tializeBean(AbstractAutowireCapableBeanFactory.jav a:1302)
2. Then I tried this :
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager">
<property name="userTransactionName">
<value>UserTransaction</value>
</property>
<property name="transactionManagerName" value="java:/TransactionManager" />
</bean>
Now I got : "org.springframework.transaction.TransactionSystem Exception: JTA UserTransaction is not available at JNDI location
[UserTransaction]; nested exception is javax.naming.CommunicationException: Receive timed out
[Root exception is java.net.SocketTimeoutException: Receive timed out]"
3. If I remove the properties of the bean transactionManager :
<bean id="txManager" class="org.springframework.transaction.jta.JtaTran sactionManager"></bean>
I get : org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager' defined in ServletContext resource
[/WEB-INF/global.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException:
No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1302)
Before trying to move to JBoss I used Jetty and the following TM and it was fine :
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager">
<property name="transactionManager">
<ref local="atomikosTM" />
</property>
<property name="userTransaction">
<ref local="atomikosUTX" />
</property>
</bean>
<bean id="atomikosTM" class="com.atomikos.icatch.jta.UserTransactionMana ger" />
<bean id="atomikosUTX" class="com.atomikos.icatch.jta.UserTransactionImp" />
I checked both JBoss and Spring forums and I couldn't find a suitable solution.
I appreciate any ideas.
Thanks in advance,
kama.
-
Aug 20th, 2008, 09:29 AM
#2
I've got the same error. Any idea ?
-
Aug 20th, 2008, 10:33 AM
#3
what I did
for me the problem turned to be some Maven transitive dependencies injected into the final .war file. I just removed them ( JBoss-client.jar, jta.jar ) and it worked.
good luck,
kama
-
May 22nd, 2009, 03:20 PM
#4
It solved my problem - thanks for posting this
I had run myself into that some years ago, and now I got the same error and your post reminded me of that :-)
Thanks for posting this here...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules