• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc not bound

 
Barun Das
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • 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 ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34860
369
Eclipse IDE Java VI Editor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic