Question: hibernate record not showing in database
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.