Exception: org. hibernate. transactionexception: transaction not successfully started
Error code: service layer session = hibernateutils. getcurrentsession ();//.... database Operation Statement (called Dao layer) Transaction Tx = session. begintransaction (); Tx. commit (); Dao layer session = hibernateutils. getcurrentsession ();//.... database Operation statement transaction Tx = session. begintransaction (); Tx. commit ();
Exception details:

Check the analysis and find the cause:
Originally, I created two transaction objects in the same thread, which violates the isolation in the acid feature of the transaction.
Solution:
Remove the repeated transaction code at the DaO layer as follows: Transaction Tx = session. begintransaction (); Tx. Commit ();
Exception: transaction not successfully started