Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

JDBC lookup failure through java:comp....

Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Posts: 4012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic