Hi Max,
The problem is solved now. I have searched about that jndi exception and read somewhere that when we i dont give name to sessionFactory in the hibernate.cfg.xml
then it runs well. And if i give any name to session factory, then it does not run. The problem is solved but i m not getting why is it so, means wats the problem with the name to session factory. So i m confused.