I'm having pretty much the exact same problem and have been trying to figure it out for days. Can you check the value of "UseJBossWebLoader" in your jboss-service.xml? When I have this set to true everything works fine, when I have it set to false (isolated class loading) I get the same null result from the JNDI query that you described.<br>
<br>-J<br><br><div class="gmail_quote">On Tue, Apr 8, 2008 at 11:37 AM, bml <<a href="mailto:do-not-reply@jboss.com">do-not-reply@jboss.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I am currently trying to access an Oracle datasource via JNDI that I have configured. I am using JBoss 4.0.3 on Windows XP Pro with Oracle 10g.<br>
<br>
The datasource seems to be binding correctly as I get the following message when I start the server:<br>
<br>
<br>
| [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=OracleDS' to JNDI name 'java:OracleDS'<br>
|<br>
<br>
The problem is that when I try to lookup the datasource in my application I can't get a reference to it. There are no errors thrown, but the datasource is null. Here is the code:<br>
<br>
<br>
| DataSource dataSource = (DataSource)new InitialContext().lookup("java:OracleDS");<br>
|<br>
<br>
Here is the oracle-ds.xml file that I am using:<br>
<br>
<br>
| <?xml version="1.0" encoding="UTF-8"?><br>
| <datasources><br>
| <local-tx-datasource><br>
| <jndi-name>OracleDS</jndi-name><br>
| <connection-url>jdbc:oracle:thin:@//<a href="http://db.mydomain.com:1521/dbsid" target="_blank">db.mydomain.com:1521/dbsid</a></connection-url><br>
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class><br>
| <user-name>user</user-name><br>
| <password>pwd</password><br>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name><br>
| </local-tx-datasource><br>
| </datasources><br>
|<br>
<br>
<br>
Any help would be much appreciated. Thanks,<br>
<br>
barry<br>
<br>
View the original post : <a href="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142414#4142414" target="_blank">http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142414#4142414</a><br>
<br>
Reply to the post : <a href="http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142414" target="_blank">http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142414</a><br>
_______________________________________________<br>
jboss-user mailing list<br>
<a href="mailto:jboss-user@lists.jboss.org">jboss-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jboss-user" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-user</a><br>
</blockquote></div><br>