File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

jdbc not bound

Barun Das
Greenhorn

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: 1124

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30293
    
150

Agreed. Moving to JBoss.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdbc not bound