-->
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: hibernate "freezes" mysql 5.0
PostPosted: Fri Mar 12, 2004 1:18 pm 
Beginner
Beginner

Joined: Fri Mar 12, 2004 1:02 pm
Posts: 23
Hi,

I just started writing a simple app using hibernate 2.1.2 and MySQL 5.0. After running a simple transaction, MySQL seems to freeze up on me. To illustrate, here is the first run of my code:
-------------------------------------
Configuration cfg = new Configuration().addClass(Product.class);
SessionFactory sf = cfg.buildSessionFactory();
Session sess = sf.openSession();
Transaction t = sess.beginTransaction();
sess.save(p);
t.commit();
sess.close();
---------------------------------------

This 'completes' just fine for the first time. However, when I try to check if the product was actually stored in the DB, I get locked up. I tried stopping the MySQL service but that fails too. When I run the above code again for another product, it stalls at "No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)".

Thus I have to reboot my machine everytime I run the above code for the first time. Is there something wrong with the code, or is it MySQL? BTW, after I do a reboot, start up MySQL service and check the tables, nothing got stored. So I'm assuming even after the first run of my code, it fails (no exceptions are thrown whatsoever). Any help would be appreciated. Thanks!

-los


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 12, 2004 2:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try with another db for a starter, for example hsqldb, should be simple enough. If that works, try using direct JDBC to rule out driver/db incompatibilitys.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 12, 2004 3:52 pm 
Beginner
Beginner

Joined: Fri Mar 12, 2004 1:02 pm
Posts: 23
I just reverted back to mysql 4.1.1 (using same driver) and it worked just fine. I also tried regular jdbc to hit mysql 5.0 and that worked ok. So I'm assuming there are some incompatibilities with hibernate 2.1.2 and mysql 5.0. For now I'll just stick with 4.1.1. Thanks anyway!

-los


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.