[jboss-user] [JCA/JBoss] - Re: Problem in acessing Oracle data Source from JBoss 4
vickyk
do-not-reply at jboss.com
Fri May 18 04:21:10 EDT 2007
anonymous wrote : javax.naming.NamingException: resource-ref: oracleDS has no valid JNDI binding. Check the jboss-web/resource-ref
You should have
1)
| <resource-ref>
| <description>DB Connection</description>
| <res-ref-name>oracleDS</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| </resource-ref>
|
The above stuff in the web.xml file of the web application
2)
| <resource-ref>
| <res-ref-name>oracleDS</res-ref-name>
| <jndi-name>java:oracleDS</jndi-name>
| </resource-ref>
|
The above line should be in the jboss-web.xml
2) Now this should work
| DataSource ds = (DataSource)ctx.lookup("oracleDS");
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046726#4046726
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046726
More information about the jboss-user
mailing list