No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'

Errors:

21:50:06,151 INFO  [STDOUT] 21:50:06,151 ERROR [ContextLoader] 
Context initialization failed org.springframework.beans.
factory.BeanCreationException: Error creating bean with name 
'txManager' defined in class path resource 
[oper-applicationContext.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'


21:52:01,227 INFO  [STDOUT] 21:52:01,227 ERROR [ContextLoader] 
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'txManager' defined in class path 
resource [oper-applicationContext.xml]: Invocation of init 
method failed; nested exception is org.springframework.
transaction.TransactionSystemException: JTA UserTransaction is 
not available at JNDI location [UserTransaction]; nested 
exception is org.springframework.jndi.TypeMismatchNamingException: 
Object of type [class org.jboss.tm.usertx.client.
ServerVMClientUserTransaction] available at JNDI location 
[UserTransaction] is not assignable to [javax.transaction.
UserTransaction]

01:44:47,610 INFO  [STDOUT] 01:44:47,610 ERROR [LoggingHandler] 
org.springframework.integration.MessageHandlingException: 
javax.persistence.PersistenceException: org.hibernate.
HibernateException: Could not instantiate dialect class
    at org.springframework.integration.handler.
    MethodInvokingMessageProcessor.processMessage
    (MethodInvokingMessageProcessor.java:76)

Solution:

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>3.3.2.GA</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-annotations</artifactId>
            <version>3.4.0.GA</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-commons-annotations</artifactId>
            <version>3.3.0.ga</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.4.0.GA</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.transaction</groupId>
                    <artifactId>jta</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

I expect your comment on this topic and other questions relating to this topic...  

--
TransactionManager and UserTransaction | Snowdrop | JBoss Community