You are trying to close session in finally block. So, I suspect there is some exception and when the flow reaches to finally block after the exception, session might be null and calling session.close() may be causing NPE. Please look into your server log for more details. Also verify if the session is null in finally block before calling session.close().
Change the below block
And also I would add simple debug statements in try block and look into server log.
No I am running the code with eclipse editor that's why I am able to send you the server log. I know the NullPointerException is in the UseHibDao.java file at line number 46 that's just below the SessionFactory create statement.
Thanks for help
Joined: Jul 09, 2010
Thanks to all, now it's working fine actually I was using missing few jar files now it's working and able to store data to the table.