-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate 3.6.7 to 4.0.1 upgrade, nested transactions error
PostPosted: Fri Jan 13, 2012 11:18 am 
Newbie

Joined: Fri Jan 13, 2012 11:14 am
Posts: 3
I'm trying to upgrade from hibernate 3.6.7 to 4.0.1, and from JDK 1.6 to JDK 1.7.

After migrating configuration files ect ect... I can run my application fine.

First a bit of cfg.xml of my hibernate:

Code:
    <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory< /property>
    <property name="current_session_context_class">thread</property>


But I'm facing 1 a problem with nested sessionFactory.getCurrentSession().beginTransaction()
This used to be working in hibernate 3.6.7, though without a "hibernate.transaction.factory_class" property.

Anyone got a clue to what I'm doing wrong?

Stack trace is like this:

Code:
    org.hibernate.TransactionException: nested transactions not supported
   at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:152)
   at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:350)
   at $Proxy4.beginTransaction(Unknown Source)


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

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.