JBoss Community

Re: TransactionManager and UserTransaction

created by Andreas Panagiotidis in Snowdrop - View the full discussion

It's exactly like this, I  had the same problem with Spring and JBoss 4.2. Exception

 

Caused by: org.springframework.transaction.TransactionSystemException:

JTA TransactionManager is not available at JNDI location [java:/TransactionManager];

nested exception is

org.springframework.jndi.TypeMismatchNamingException:

Object of type [class org.jboss.tm.TxManager]

available at JNDI location [java:/TransactionManager] is not assignable

to [javax.transaction.TransactionManager]

 

My application had added in the EAR its own JTA library, thus this one was used instead of the jta that comes from JBoss.

 

I use maven, so excluding the JTA artifacts in my pom solved the problem.

 

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-validator</artifactId>
    <exclusions>
     ...
         <exclusion>
             <groupId>javax.transaction</groupId>
             <artifactId>jta</artifactId>
          </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.quartz-scheduler</groupId>
    <artifactId>quartz</artifactId>
    <version>1.8.4</version>
    <exclusions>
         <exclusion>
             <artifactId>slf4j-api</artifactId>
             <groupId>org.slf4j</groupId>
         </exclusion>
         <exclusion>
              <groupId>javax.transaction</groupId>
              <artifactId>jta</artifactId>
                </exclusion>
         </exclusions>
</dependency>

Reply to this message by going to Community

Start a new discussion in Snowdrop at Community