• 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 ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

jdbc not bound

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

i am using Eclipse as my IDE, JBoss as my AS, Postgres as my Database server. when i am trying to connect database from my action class its get connected but when i'm using EJB and trying to connect i get error "javax.naming.NameNotFoundException: jdbc not bound". i'm having class to get connection. code is as simple as

Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/myCoreDS");
Connection conn = ds.getConnection();

Please help me cause i've spent lots of time and i have not got any thing useful.

Thanking you in advance.
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Barun,
Your question has nothing to do with JDBC -- it has to do with how you are configuring "JBoss". Hence I suggest you try the EJB and the JBoss forums.

My guess is that your lookup string:

I presume you can probably find the exact details in the "JBoss" documentation.

Good Luck,
Avi.
[ December 29, 2004: Message edited by: Avi Abrami ]
 
author & internet detective
Posts: 40801
829
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Agreed. Moving to JBoss.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic