IBM Support

NMSV0605W :javax.naming.NameNotFoundException: eis/jdbc/LOANDSN_CMP. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound

Troubleshooting


Problem

A datasource with JNDI name ( jdbc/LOANDSN ) is created for the Container Managed Persistence (CMP) beans, but the Use this datasource for the container managed persistence option is not checked. Exception data follows: NMSV0605W javax.naming.NameNotFoundException: eis/jdbc/LOANDSN_CMP. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound Click on the stack.txt link at the bottom of this technote to view the full stack from the trace file.

Cause

One possible reason for this error is that the Use this datasource for the container managed persistence option for the datasource is not checked, so the connection factory that is used by a CMP bean to access the backend data store is not created in the JNDI name space. This causes the IBM® WebSphere® Application Server Persistence Manager that looks for the CMP Connection Factory with JNDI name eis/jdbc/LOANDSN_CMP to fail with the NameNotFoundException.

Resolving The Problem

To fix this problem, use the datasource configuration to check the Use this datasource for the container managed persistence checkbox.


  1. To do this, navigate to the datasource configuration panel as follows: Administrative Console > Resources > JDBC Providers > Select your JDBC Provider > data source.
     
  2. Click on the datasource with JNDI name (jdbc/LOANDSN).
     
  3. Select Container Managed Persistence. Use this datasource for container managed persistence as shown in the screen shot below. This will create a CMP connection factory ( eis/jdbc/LOANDSN_CMP) which corresponds to this datasource to be created for the RRA Automatically. This connection factory is a read-only connection. It cannot be used to modify or delete data records.
     
  4. To see the corresponding automatically created RRA CMP Connection Factory for the datasource you have created for the CMP Beans, select Console > Resources > Resource Adapter > WebSphere Relational Resource Adapter > CMP Connection Factories.


stack.txt

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"DB Connections\/Connection Pooling","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5.5","Edition":"Base;Express;Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Java SDK","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
20 December 2019

UID

swg21170393