hibernate 事务嵌套导致org.hibernate.TransactionException: Transaction not successfully started

若出现org.hibernate.TransactionException: Transaction not successfully started 这个异常,考虑一下你的代码中是否有hibernate 事务嵌套,如下面的形式:

Transaction tx1=session.beginTransaction()

         Transaction tx2=session.beginTransaction()

         tx2.commit();

tx1.commit();

若有,可能就是出错的原因

你可能感兴趣的:(Hibernate)