session =sessionFactory.openSession(); //inserting rocords in Echo Message table...)); //It showing on console Records inserted 21 But not showing in database
add the line org.hibernate.Transaction tx = session.beginTransaction(); below session =sessionFactory.openSession(); in your code and also add the below line tx.commit(); at the end and save and run the FirstExample.java. It will solve the problem. It worked for me.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.