4 Replies Latest reply on Mar 4, 2010 5:20 AM by Mathieu Ruellan

    java.lang.ClassNotFoundException:  org.hibernate.transaction.JTATransactionFactory

    Mathieu Ruellan Newbie
      Hello,
      I'm deploying a application which works with jetty (Atomikos & ActiveMQ), under jbossAS 5.1.0.GA.
      Packaging is done with maven 2.
      I take care removing all conflicted jars.
      I've got this error at the war deployment:
      2010-03-04 10:19:48,993 INFO  [org.hibernate.dialect.Dialect] (main) Using dialect: org.hibernate.dialect.PostgreSQLDialect
      2010-03-04 10:19:49,009 INFO  [org.hibernate.transaction.TransactionFactoryFactory] (main) Transaction strategy:  org.hibernate.transaction.JTATransactionFactory
      2010-03-04 10:19:49,009 ERROR [org.hibernate.transaction.TransactionFactoryFactory] (main) TransactionFactory class not found
      java.lang.ClassNotFoundException:  org.hibernate.transaction.JTATransactionFactory from BaseClassLoader@3de867{VFSClassLoaderPolicy@64f9b5{name=vfsfile:/C:/jboss-5.1.0.GA/server/default/conf/jboss-service.xml domain=ClassLoaderDomain@134eb84{name=DefaultDomain parentPolicy=BEFORE[ ............ ] <IMPORT-ALL>NON_EMPTY}}
      at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      Any idea?
      thanks for answers!
        • 1. Re: java.lang.ClassNotFoundException:  org.hibernate.transaction.JTATransactionFactory
          jaikiran pai Master

          ticoli wrote:

           


          java.lang.ClassNotFoundException:  org.hibernate.transaction.JTATransactionFactory

          Where is that being configured? In hibernate.cfg.xml or persistence.xml? Looks like the xml where this classname is specified contains a space at the start of the classname which is causing this exception.

          • 2. Re: java.lang.ClassNotFoundException:  org.hibernate.transaction.JTATransactionFactory
            Mathieu Ruellan Newbie

            I'm using a spring configuration, without hibernate.cfg.xml or persistence.xml

             

            spring conf file :

                 <!--sessionFactory will get autowired-->

                 <bean id="fppFormDbSessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">

                           <property name="dataSource" ref="fppFormDbDataSource"></property>

             

                           <property name="schemaUpdate">

                                         <value>false</value>

                 </property>

             

                           <property name="annotatedClasses" ref="annotatedClassesList" />

             

                           <property name="hibernateProperties">

                                     <ref bean="fppFormDbHibernateProperties" />

                           </property>

                 </bean>

             

             

                 <util:list id="annotatedClassesList">

                           <value>com.mycompany.class1</value>

                           <value>com.mycompany.class2</value>

                 </util:list>

             

                 <bean id="fppFormDbHibernateProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">

                      <property name="properties">

                                     <props>

                                               <prop key="hibernate.dialect">${fpp.form.formdb.dialect}</prop>

                                               <prop key="hibernate.show_sql">${fpp.form.formdb.hibernate.show_sql}</prop>

                                               <prop key="hibernate.transaction.factory_class">

                                                         ${fpp.form.formdb.hibernate.transaction.factory_class}

                                               </prop>

                                               <prop key="hibernate.transaction.manager_lookup_class">

                                                         ${fpp.form.formdb.hibernate.transaction.manager_lookup_class}

                                                </prop>

                                               <prop key="hibernate.connection.isolation">3</prop>

                                               <prop key="hibernate.current_session_context_class">jta</prop>

                                     </props>

                       </property>

                 </bean>

            • 3. Re: java.lang.ClassNotFoundException:  org.hibernate.transaction.JTATransactionFactory
              jaikiran pai Master

              ticoli wrote:

               


                                                 <prop key="hibernate.transaction.factory_class">

                                                           ${fpp.form.formdb.hibernate.transaction.factory_class}

                                                 </prop>

                                                 <prop key="hibernate.transaction.manager_lookup_class">

                                                           ${fpp.form.formdb.hibernate.transaction.manager_lookup_class}

                                                  </prop>

                                 


              There should be no leading or trailing spaces in the values for these properties.

              1 of 1 people found this helpful
              • 4. Re: java.lang.ClassNotFoundException:  org.hibernate.transaction.JTATransactionFactory
                Mathieu Ruellan Newbie

                thanks for answer, I will check and give you a feed back.

                 

                edit: problem resolved! thanks a lot!