Using the test connection function to test a JDBC™ resource definition does not check the JNDI name property
 Technote (troubleshooting)
 
Problem(Abstract)
Three ways exist to test a connection to a database using the parameters that are defined in a data source in WebSphere Application Server V5.0 releases. You can use the Test Connection option in the administrative console , the wsadmin tool, or a Java™ program. All three processes invoke the same methods on the same MBean.

However, if you mistype the Java Naming Directory Interface (JNDI) name when defining a Java Database Connectivity (JDBC) resource, the test connection function does not detect the error. Later, you can receive JNDI name errors for a resource that tested without error using the test connection MBean.

An illustration of a typical error is presented in the following example:

SQLException detected in <Bean>: java.sql.SQLException
First component in name <data_source_name> not found.
Root exception is:
org.omg.CosNaming.NamingContextPackage.NotFound:
IDL:omg.org/CosNaming/NamingContext/NotFound
 
Cause
The test connection MBean does not use the JNDI name to access the resource. Therefore, the MBean does not check the JNDI name property.
 
Resolving the problem
If you receive a message that indicates an error that is related to a JNDI name for a JDBC resource, check the JNDI name property within the JDBC resource to ensure it is correct.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 5.0
Software edition:
Reference #: 1170370
IBM Group: Software Group
Modified date: May 28, 2004