Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

JDBC help?

 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ranchers...
iam using JDeveloper10g,and this is the code iam using to retrieve connection to database ,and this is the some information:
database: oracle database
userName and password for the database :test/test
the database located at remote machine and has this IP address: 10.0.0l.200
SID : ORCL
JDBC port : 1521



but i can NOT gain the connection..
can you help me?


[ November 01, 2006: Message edited by: Ala'a Hendi ]
[ November 01, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
  • Did you create a DataSource named orcl ?
  • Is your code running inside container, becuase you can not get connection from Datasource our of your container


  • Shailesh
     
    Alan Hermin
    Ranch Hand
    Posts: 290
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Shailesh Chandra..
    iam using JDeveloper 10g IDE...i think JDeveloper 10g use OC4J..
     
    Shailesh Chandra
    Ranch Hand
    Posts: 1087
    Oracle Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Do you get any exception ?
     
    Alan Hermin
    Ranch Hand
    Posts: 290
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    yes i got this ugly exception:
     
    Shailesh Chandra
    Ranch Hand
    Posts: 1087
    Oracle Spring Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Ala'a Hendi:
    yes i got this ugly exception:
    Could not locate datasource! Reason:
    javax.naming.CommunicationException: Connection refused: connect [Root



    Your problem is with DataSource only. As error states


    Could not locate datasource!



    I think you didn't create a datasource.

    hope this URL will help

    http://www.oracle.com/technology/products/jdev/howtos/10g/usingdatasources/using_datasources.html


    Shailesh
     
    Alan Hermin
    Ranch Hand
    Posts: 290
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    thank you .......
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic