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
|