Receive J2CA0122I message during JNDI lookup of data source or connection factory
 Technote (troubleshooting)
 
Problem(Abstract)
Why is the following message logged when a JNDI lookup is done in WebSphere® V5?

J2CA0122I: Resource reference {0} could not be located, so default values of the following are used: {1}
 
Resolving the problem
This informational message might be output when JNDI lookup is done on a WebSphere 5.0 data source or a JMS connection factory. It is not a warning or error, and it can safely be ignored. When the message appears, it means that no resource reference has been created for the resource, a direct JNDI lookup is done, and the default values of the following properties are used:
res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)

To use values that are different from the defaults, use the Application Assembly Tool to define a resource reference:


The resource reference can also be created in the EJB Deployment Descriptor (ejb-jar.xml), Web Deployment Descriptor (web.xml), or Application Client Deployment Descriptor (application-client.xml) editors within the Application Server Toolkit (ASTk), which ships with WebSphere 5.0.2 and higher, and within WebSphere Studio Application Developer.

The deployment descriptor XML files can also be edited manually, but this is not recommended.

After the resource reference is defined, an indirect JNDI lookup can be done (using the java:comp/env context). Then the values for the resource reference properties that are defined in the resource reference are loaded and the J2CA0122I message no longer is logged.

See FAQ #1106933 (JNDI_Naming/swg21106933.html) for details on the differences between direct and indirect JNDI lookups.

 
 
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 > Java 2 Connectivity (J2C)
Operating system(s): Windows
Software version: 5.1
Software edition:
Reference #: 1105545
IBM Group: Software Group
Modified date: Aug 5, 2004