Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.
Tanvi Ch
Greenhorn
Joined: Mar 15, 2010
Posts: 2
posted
0
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