Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JNDI/Naming/Network] - Re: lookup database source
 weird problem

scott.stark@jboss.org

2007-05-04


anonymous wrote : oracleDS = (javax.sql.DataSource) initialContext.lookup("jdbc/OracleDS");

This should be

oracleDS = (javax.sql.DataSource) initialContext.lookup("java:comp/env/jdbc/OracleDS");

Also,
anonymous wrote :
| <resource-ref>
| <res-ref-name>jdbc/OracleDS</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <jndi-name>jdbc/OracleDS</jndi-name>
| </resource-ref>

The jndi-name here doesnt look right to me. Most of the times it is java:/OracleDS. So try using the following:


<resource-ref>
| <res-ref-name>jdbc/OracleDS</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <jndi-name>java:/OracleDS</jndi-name>
| </resource-ref>
|

If that doesnt work, post the error message that you are seeing and also the *-ds.xml file which you are using for configuring the datasource

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043245#4043245

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043245
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.