[jboss-user] [Installation, Configuration & DEPLOYMENT] - Oracle DS/JNDI Issue

Jay Kraly jaykraly at gmail.com
Tue Apr 8 11:47:36 EDT 2008


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.

-J

On Tue, Apr 8, 2008 at 11:37 AM, bml <do-not-reply at jboss.com> wrote:

> Hi,
>
> 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"?>
>  | <datasources>
>  |   <local-tx-datasource>
>  |     <jndi-name>OracleDS</jndi-name>
>  |     <connection-url>jdbc:oracle:thin:@//db.mydomain.com:1521/dbsid
> </connection-url>
>  |     <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
>  |     <user-name>user</user-name>
>  |     <password>pwd</password>
>  |
> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
>  |   </local-tx-datasource>
>  | </datasources>
>  |
>
>
> Any help would be much appreciated. Thanks,
>
> barry
>
> View the original post :
> http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142414#4142414
>
> Reply to the post :
> http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142414
> _______________________________________________
> jboss-user mailing list
> jboss-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20080408/eaa29836/attachment.html 


More information about the jboss-user mailing list