I've tried it and you can't use hibernate with a Tomcat JNDI beginning "java:comp/env". In tomcat, that is a read-only Context, which cannot be updated.
So, I changed mine to a random name "dgf:/hibernate/SessionFactory" and got it to work after I added the 'name' attribute for the session tag in my hibernate.cfg.xml file. I believe it is called 'hibernate.jndi.url' if you use a hibernate.properties file instead of a hibernate.cfg.xml file.
My previous posting with an example for JNDI, is at:
http://forum.hibernate.org/viewtopic.ph ... highlight=
Regards,
David