-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: upgrade to 3.1.2 and AnnotationBeta9 broke
PostPosted: Wed Apr 26, 2006 7:21 am 
Regular
Regular

Joined: Thu Sep 16, 2004 4:56 pm
Posts: 80
I just upgraded EntityManager to beta 7, Annotations to beta 9 and hibernate to 3.1.2CR1

I now get the below exception. I still have the jta.jar in my classpath so I am not sure why I get this.

java.lang.RuntimeException: The chosen transaction strategy requires access to the JTA TransactionManager
at biz.xsoftware.test.requirements.hib.HibTestCase2.setUp(HibTestCase2.java:60)
at biz.xsoftware.test.examples.TestHibernateExamples.setUp(TestHibernateExamples.java:24)
at junit.framework.TestCase.runBare(TestCase.java:128)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:311)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1180)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:505)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:632)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:501)
at biz.xsoftware.test.requirements.hib.HibTestCase2.buildSessionFactory(HibTestCase2.java:41)
at biz.xsoftware.test.requirements.hib.HibTestCase2.setUp(HibTestCase2.java:56)
... 9 more


Top
 Profile  
 
 Post subject: I have the same problem with jboss and mysql
PostPosted: Sun Sep 24, 2006 5:16 pm 
Beginner
Beginner

Joined: Thu Sep 21, 2006 2:49 am
Posts: 24
I have the same problem with jboss and mysql:

Code:
23:08:18,638 ERROR [STDERR] Caused by: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
23:08:18,638 ERROR [STDERR]    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:329)
23:08:18,638 ERROR [STDERR]    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
23:08:18,638 ERROR [STDERR]    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:688)
23:08:18,638 ERROR [STDERR]    ... 147 more


my persistence.xml:
Code:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
   version="1.0">
   <persistence-unit name="test1" transaction-type="JTA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/doorisTest1DB</jta-data-source>
      <properties>
         <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
         <!-- Transaction integration -->
       <property name="transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory"/>
       <property name="transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
      </properties>
   </persistence-unit>
</persistence>


any idea??

_________________
http://www.dooris.de


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 24, 2006 7:34 pm 
Regular
Regular

Joined: Thu Sep 16, 2004 4:56 pm
Posts: 80
no idea....I gave up and went back to using hibernate api instead of EJB3 api with EJB3 annotations. Maybe someday, I can switch back to using the EJB3 api.
dean

_________________
The list of compelling reasons to reduce the estimate does not include you simply wishing it would take less time - Unknown


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.