We're updating the issue view to help you get more done. 

Jndi lookup doesn't found datasource with tomcat

Description

I migrate my application from hibernate 3 to 4, but at startup I got an exception that I couldn't get datasource. Seem that InitialContext is empty. I let tomcat manages connection.

Caused by: org.hibernate.service.jndi.JndiException: Unable to lookup JNDI name [java:comp/env/jdbc/myCompDb]
at org.hibernate.service.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:68)
at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:116)

I ask on forum at:
https://forum.hibernate.org/viewtopic.php?f=1&t=1013101

Environment

oracle 10g, tomcat 7

Status

Assignee

Unassigned

Reporter

Mathevet

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

4.0.1

Priority

Major