2 Replies Latest reply on Apr 9, 2008 1:36 PM by BML BML

    Oracle DS/JNDI Issue

    BML BML Newbie


      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.

      The datasource seems to be binding correctly as I get the following message when I start the server:

      [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=OracleDS' to JNDI name 'java:OracleDS'

      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:

      DataSource dataSource = (DataSource)new InitialContext().lookup("java:OracleDS");

      Here is the oracle-ds.xml file that I am using:

      <?xml version="1.0" encoding="UTF-8"?>

      Any help would be much appreciated. Thanks,