File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Java Products and Servers and the fly likes JDBC lookup failure through java:comp.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "JDBC lookup failure through java:comp...." Watch "JDBC lookup failure through java:comp...." New topic

JDBC lookup failure through java:comp....

Subadhra Velu

Joined: Jul 01, 2004
Posts: 4
I have just started using oracle9iAS . I am able to access my datasource from a Java client with the following code:
Properties env = new Properties();
InitialContext ic = new InitialContext(env);
DataSource ds = (DataSource)ic.lookup("jdbc/OracleTestCoreDS");
System.out.println("Data source is : "+ds);

But the EJB-suggested way of looking up : "jva:comp/env/jdbc/OracleTestCoreDS" in my ic.lookup parameter is not working.
I have added the following resource-ref tag to my application-client.xml:

Can anyone let me know where i am going wrong? If the first lookup is working the proper registration of the data source is complete right? Is Any other orion specific file modification is required.
Pauline McNamara

Joined: Jan 19, 2001
Posts: 4012
Welcome to Javaranch Subadhra Velu.

I'm guessing that you meant to ask this question in the Oracle forum, so I'll move it over there.

Hang on...

...OK, it's over there now.


oracle? orion? kinda like sweden and switzerland, they get mixed up all the time...
[ July 02, 2004: Message edited by: Pauline McNamara ]
I agree. Here's the link:
subject: JDBC lookup failure through java:comp....
It's not a secret anymore!