javax.naming.NameNotFound exception with db connection pool
External database integration using connection pool configuration in Tomcat app server fails.
The following error is in the log during test connection from the database configuration rule.
The DataSource jdbc/your_db is invalid: Unable to obtain DataSource object: code: <none> SQLState: Name [jdbc/your_db ] is not bound in this Context. Unable to find [jdbc]. Message: <none>
DatabaseException caused by prior exception: javax.naming.NameNotFoundException: Name [jdbc/your_db ] is not bound in this Context. Unable to find [jdbc].
Steps to Reproduce
Create a Database instance using JDBC Datasource setting JNDI name jdbc/your_db.
A third-party product issue.
This is the incorrect specification for the database JNDI name.
Make the following change to the operating environment:
The JNDI name should be java:/comp/env/jdbc/your_db.
See the Tomcat documentation on jndi-datasource-examples-howto.