8 Replies Latest reply on Feb 22, 2013 12:48 AM by pramma

    No JTA TransactionManager found

    myroyal

      Deal All:

      i use jboss4.2.3 GA ,connect to sqlserver2008,and i get the following debug infomation:

      DEBUG [org.springframework.transaction.jta.JtaTransactionManager] No JTA TransactionManager found at fallback JNDI location [java:comp/TransactionManager]

      org.springframework.transaction.TransactionSystemException: JTA TransactionManager is not available at JNDI location [java:comp/TransactionManager]; nested exception is javax.naming.NameNotFoundException: TransactionManager not bound.

       

      how to solve this problem?

        • 1. Re: No JTA TransactionManager found
          andy215

          Your jndi name looks wrong, plesae use "java:/TransactionManager" as your jndi name and try it again.

          • 2. Re: No JTA TransactionManager found
            myroyal

            Ths andy215.

            i had deployed my application at jboss-4.2.3.GA\server\default,so i need to modify server/all/config/jboss-service.xm or server/default/config/jboss-service.xm ?

            and like this :<attribute name="JndiName">java:/TransactionManager</attribute>

            ?

             

            • 3. Re: No JTA TransactionManager found
              andy215

              You don't need to modify anything.

              Please visit your jmx-console   http://ip:port/jmx-console, find "service=JNDIView", click this link, then you can see the "jndiview mbean", find "

              java.lang.String list()" method, click invoke, then you will see all the jndi names, search "TransactionManager", I think you can find it under the "java: Namespace", if so, the TransactionManager jndi name should be "java:/TransactionManager".

              BTW, please note that if the jndi name begin with "java:", it can not look up across jvm

               

              Hope this can resolve your problem

              • 4. Re: No JTA TransactionManager found
                myroyal

                Ths.

                Happy New year.

                Has other communication type to you ?for example msn or qq ?there is other information need to communicate to you in time .

                • 5. Re: No JTA TransactionManager found
                  myroyal

                  and i will add following processings about this problem.

                  • 6. Re: No JTA TransactionManager found
                    andy215

                    Happy New Year!

                    My msn is xupanpan215@msn.com

                    • 7. Re: No JTA TransactionManager found
                      apanag

                      As rightly said, in JBoss 4.2 the TransactionManager JNDI is [java:/TransactionManager]

                       

                      Spring's default location is the [java:comp/TransactionManager], and this is where your spring or spring batch application looks for a reference of the bean.

                      The solution to your problem is to set the transactionManagerName of the transactionManager bean:

                       

                      <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" >

                              <property name="transactionManagerName" value="java:/TransactionManager"/>       

                      </bean>

                      • 8. Re: No JTA TransactionManager found
                        pramma

                        Hi,

                         

                        I tried looking up Transaction Manager with name "java:/TransactionManager" and "java:jboss/TransactionManager" and lookup is returning null.

                         

                        I tried with anotation and

                        @Resource(mappedName = "java:jboss/TransactionManager")

                            private TransactionManager tx;

                        old style new InitialContext().lookup("java:jboss/TransactionManager"). Both the time tx is null;

                         

                        I am trying this in a Pojo which is invoked by a EJB. I tried in EJB too with same result.

                         

                        I am using jboss 4.2.3.GA.

                        I did not find any clue. Pls Help.