• 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

Getting Datasource object configured in JBOSS

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

I wanted to use DataSource to connect to Oracle database. I am able to configure DataSource in JBoss server (See This). I can see following message on startup of JBoss (I am using jboss-4.0.4.GA) running in my PC:



But I am not able to connect to this DataSource. I used following code to connect to data source:


I am getting following exception:


Is there anything wrong? How can I connect to Oracle Datasource configured on JBoss Server?

Cheers,
Krishna
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try viewing/adding the data source in the JBoss admin console. Oh, and moving to JBoss forum...
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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



As you can see, the datasource is bound to the java: namespace (by default). This means that the datasource is not accessible remotely. You can look it up only from the same JVM as the server. In your case, you are looking it up from a standalone client and hence running into this issue. See this for a probable workaround.
[ March 27, 2008: Message edited by: Jaikiran Pai ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic