-->
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.  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Transaction not successfully started
PostPosted: Thu Mar 13, 2014 2:55 pm 
Newbie

Joined: Thu Mar 13, 2014 2:48 pm
Posts: 1
Hi everyone! I'm new here and I was facing the same problem. But I solved this when, before the save/commit, I just used session.getTransaction().begin() as you can see below:

Code:
session.getTransaction().begin();
session.save(user);
session.getTransaction().commit();
session.close();


Hope this can be helpful for someone! ;)


Top
 Profile  
 
 Post subject: Re: Transaction not successfully started
PostPosted: Mon Jan 05, 2015 7:42 am 
Newbie

Joined: Tue Nov 04, 2014 3:36 am
Posts: 4
EDIT: error


Top
 Profile  
 
 Post subject: Re: Transaction not successfully started
PostPosted: Tue Jan 27, 2015 6:54 am 
Newbie

Joined: Tue Jan 27, 2015 6:44 am
Posts: 1
Hello Together,

i had the same problem. The root cause in my code was, that i committed a transaction in a transaction while the first transaction was not committed. Im using Mysql and the JDBC of mysql. I solved the problem, that i dont start a transaction in a transaction. I do everything in the same transaction.


for reproduction:

1) start a transaction1
2) before commit of transaction1, start a transaction2 and do commit
3) commit transaction1

Kind Regards

Remo


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page Previous  1, 2

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.