-
1. Re: javax.naming.NameNotFoundException
minusone Dec 11, 2002 9:36 PM (in response to minusone)never mind... fixed. i'm an idiot.
-
2. Re: javax.naming.NameNotFoundException
plezy Dec 12, 2002 5:40 PM (in response to minusone)What was the issue, I encounter the same problem.
-
3. Re: javax.naming.NameNotFoundException
jk.mkiii Dec 19, 2002 7:32 AM (in response to minusone)What was problem? I seem to be idiot too...
-
4. Re: javax.naming.NameNotFoundException
dytodyto Dec 19, 2002 8:57 AM (in response to minusone)Me too.....:)
Anyone out there that can post a idiotproof description on how to do this?
KK -
5. Re: javax.naming.NameNotFoundException
charuselva Dec 19, 2002 11:02 AM (in response to minusone)I used like this. It works
Context ctx = new InitialContext();
javax.sql.DataSource dataSource = (javax.sql.DataSource)ctx.lookup("java:/jdbc/XXX");
Try putting java:/ in front of the JNDI name -
6. Re: javax.naming.NameNotFoundException
plezy Dec 19, 2002 5:03 PM (in response to minusone)I solved the problem looking in JNDI with
InitialContext ic = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("java:comp/env/jdbc/myDB");
Also you have to define correctly in the jboss.xml the resource ref
<resource-ref>
<res-ref-name>jdbc/myDB</res-ref-name>
<jndi-name>java:/myDB</jndi-name>
</resource-ref>
java:/myDB is the name defined when creating the datasource.