File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes jdbc not bound Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "jdbc not bound" Watch "jdbc not bound" New topic

jdbc not bound

Barun Das

Joined: Dec 29, 2004
Posts: 9
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

Joined: Oct 11, 2000
Posts: 1141

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,
[ December 29, 2004: Message edited by: Avi Abrami ]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

Agreed. Moving to JBoss.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: jdbc not bound
It's not a secret anymore!