Deepak,
The first thing I see in your code is that you're passing in the exact same SQL query to Hibernate Session.createQuery(
String). If you want to use SQL, you need to use Session.createSQLQuery(String). Or you need to write the query properly in HQL to use createQuery.
Secondly, have you enabled logging of Hibernate's SQL? That would enable you to see the SQL Hibernate is generating and understand why certain errors are thrown.
This article on JavaLobby gives a quick overview of how to enable this.