ColdFusion · Database exception

JNDI Datasource Misconfigured Or Not Found

What does JNDI Datasource Misconfigured Or Not Found mean in ColdFusion?

When a datasource is registered against an external application server's JNDI resource (a WebSphere- or Tomcat-managed pool, for example) instead of a plain CF-managed DSN, a mismatch between the JNDI name registered in the app server's XML configuration and the name entered in ColdFusion Administrator surfaces as a lookup failure — sometimes as bluntly as "the system has attempted to use an undefined value" rather than a clear not-found error.

JNDI Datasource Misconfigured Or Not FoundAdobe ColdFusion

Condition

When a datasource is registered against an external application server's JNDI resource (a WebSphere- or Tomcat-managed pool, for example) instead of a plain CF-managed DSN, a mismatch between the JNDI name registered in the app server's XML configuration and the name entered in ColdFusion Administrator surfaces as a lookup failure — sometimes as bluntly as "the system has attempted to use an undefined value" rather than a clear not-found error.

Fix

Prepend java:comp/env/ to the JNDI name exactly as registered in the application server's resource definition when entering it in ColdFusion Administrator, use application-server credentials rather than database credentials in the datasource fields, and restart after any XML configuration change.

Related database exception