aruna sameera wrote:but if i comment the flush and close it gives this
Add the commons-logging.jar to your application classpath.
You need to save the entities in a Transaction like
Transaction tx = session.beginTransaction();
// populate and save your entity.
tx.commit();
// if some exception occurs, check if the transaction is Active, if it is, do a tx.rollback();
Please do a 'google' for some hibernate tutorials, go through them for proper understanding.