IntelliJ Java IDE
The moose likes Websphere and the fly likes Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Websphere
Reply Bookmark "Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object." Watch "Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object." New topic
Author

Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.

Tanvi Ch
Greenhorn

Joined: Mar 15, 2010
Posts: 2
Hi,

I am getting a problem while connecting to the datasource from my java code.
I am using websphere,
my application code is as follows
return (javax.sql.DataSource)initialContext.lookup("java:comp/env/jdbc/sampDB");
i have specified the resource ref in web.xml as
<resource-ref id="ResourceRef_1268644568185">
<description></description>
<res-ref-name>jdbc/sampDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>CONTAINER</res-auth>
</resource-ref>
and binding as
<resRefBindings xmi:id="ResourceRefBinding_1268644568185" jndiName="jdbc/sampDB">
<bindingResourceRef href="WEB-INF/web.xml#ResourceRef_1268644568185"/>

when i run the application i am getting problem as
Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.
i created the datasource in console with jndi name jdbc/sampDB, when i tested there it is connecting successfully.
i kept all the jar files also properly.
can any body help me please
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2207

Moved to our Websphere forum.
The issue is related to configuring JNDI resources in Websphere, and consuming these resources in your code.
Devaka Cooray
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2595

"Tanvi Ch" please check your private messages regarding an important administrative matter from JavaRanch.


Author of ExamLab - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
 
 
subject: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.
 
Threads others viewed
TimerManager Problem
WAS 6.1 Data source problem
Retrieving datasource from jndi in java studio creator
urgent -- datasource problem
JNDI DATASOURCE PROBLEM WITH WSAD
MyEclipse, The Clear Choice