Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes EJB and other Java EE Technologies and the fly likes Oracle Datasource V5 error in Websphere 5.1.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Oracle Datasource V5 error in Websphere 5.1.2 " Watch "Oracle Datasource V5 error in Websphere 5.1.2 " New topic
Author

Oracle Datasource V5 error in Websphere 5.1.2

Narendra Yalavarthi
Greenhorn

Joined: Nov 02, 2004
Posts: 2
Hi
I have created a datasource in websphere using console and able to Test connection succesfully, however when i try to access through my application (from DAO) it throws following exception
before I was able to setup datasource locally using WSAD, but not able to do same on App server on Unix box.


[11/2/04 10:41:05:560 EST] 29ad5b4e Helpers W NMSV0605W: A Reference object looked up from the context "java:" with the name "comp/env/jdbc/SRSDataSource" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ws.util.ResRefJndiLookupObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: java.lang.Object
Type: ResRefJndiLookupInfo
Content: com.ibm.ws.util.ResRefJndiLookupInfo@5c8c5b56 ResRefJndiLookupInfo: Look up Name="jdbc/SRSDataSource";JndiLookupInfo: jndiName="jdbc/SRSDB"; providerURL=""; initialContextFactory=""

Exception data follows:
javax.naming.NameNotFoundException: Context: srs-was-dev/nodes/srs-was-dev/servers/server1, name: jdbc/SRSDB: First component in name jdbc/SRSDB not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:1983)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1320)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:2424)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:2877)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:1390)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3491)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1519)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:372)

-----------------
Here is my java code

Context ctx = new javax.naming.InitialContext();
ds = (javax.sql.DataSource) ctx.lookup("java:comp/env/jdbc/SRSDataSource");
------------------------
Here is my ds setting in console
Name : SRSDataSource
JNDI Name : jdbc/SRSDB
------------------

I also have references to the datasources from my EJBS defined in ejb-jar.xml and ibm-ejb-jar-bnd.xmi files - same setting and same code works great in WSAD.

any help ?
thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle Datasource V5 error in Websphere 5.1.2
 
Similar Threads
Oracle Datasource V5 error in Websphere 5.1.2
EJB to EDB Mapping problems
Unable to do a jndi lookup. Getting Exception
Name not found in context "java:".
NameNotFoundException