• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems in binding Oracle database through JNDI in JBoss to my application

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to configure Oracle datasource in JBoess.
1. I created the file oracle-ds.xml with the content:
<?xml version="1.0" encoding="UTF-8"?>

2. updated in the lib the relevant jar with the jdbc driver.
3. define in my application a datasource by:

the result:
in case connection="bilby" I get:
javax.naming.NameNotFoundException: bilby not bound
and in case connection="java:bilby" I get: null object

even though JBoss print in its output the line:
18:37:56,560 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=bilby' to JNDI name 'java:bilby'

and I also can see this datasource defined in the JMX web-console (Started with state=3)

Why can't I get the datasource that I defined? perhaps there is a security issue that doesn't allow application recieve java resource automatically and I still need to cofigure something else to allow it?

See also (here)
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have moved this thread to our JBoss forum.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is you application a stand-alone app or is it an app deployed to JBoss AS?

If deployed to JBoss AS, the name "java"bilby" should return the data source. There is nothing else that you need to do; in fact, once the name appears in JNDI ther is no way to restrict any app from accessing it. I assume that no messages appear in the log ate the time of the lookup.
 
Guy Roth
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I discovered the source to my problem:
I am running my application on JBoss server 4.2.3.GA and use JBoss cache 3.1 as part of the application deployment.
It seems that the jar to support JBoss cahce that are part of my WEB-INF/lib are in conflict with the jar of JBoss AS

I looked at this article that discusses JBoss class-loading and my question is:

Is it possible to isolate only selected packages from my application so that the will load utility classes first from server/default/lib while the rest of the classes from my application will use same utility classes but look for them first from the application's archive?
So I could use different version of the same utility classes in the same application?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic