aspose file tools*
The moose likes JDBC and the fly likes connecting to oracle db problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connecting to oracle db problem" Watch "connecting to oracle db problem" New topic
Author

connecting to oracle db problem

Jan Tang
Greenhorn

Joined: Sep 23, 2003
Posts: 9
hi all

I've written a piece of code to connect to an oracle database. for some reasons I couldn't log on correctly. And I am sure the username and password are both correct for I can log on without a problem in web browser.I've debugged the code and found that the program always stopped on making connection(the line I use bold font below)


Can anyone help me out here? I really need to figure it out,cheers.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30776
    
157

Jayne,
Did the code print an exception, hang, etc? Tell us a little more about the symptoms of the problem.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jan Tang
Greenhorn

Joined: Sep 23, 2003
Posts: 9
Originally posted by Jeanne Boyarsky:
Jayne,
Did the code print an exception, hang, etc? Tell us a little more about the symptoms of the problem.


I am also expecting an exception which could make this problem looks easier,however,as I've said,the code stops running on the line I emphasized and no Exception at all.It's so weird,isn't?I suspect it's the problem of connection url.
Jan Tang
Greenhorn

Joined: Sep 23, 2003
Posts: 9
Originally posted by Jeanne Boyarsky:
Jayne,
Did the code print an exception, hang, etc? Tell us a little more about the symptoms of the problem.


OK,cheers mate.After a few seconds of waiting,here comes the Excpetion messages:


sorry about what I said before,I should be more patient on that
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

  • Check if your Oracle Service is running
  • Check if machine is available on network try pinging the machine ping 131.170.24.43



  • Shailesh


    Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
    Jan Tang
    Greenhorn

    Joined: Sep 23, 2003
    Posts: 9
    Originally posted by Shailesh Chandra:
  • Check if your Oracle Service is running
  • Check if machine is available on network try pinging the machine ping 131.170.24.43


  • Shailesh


    The machine is running anyway,because I can access it by webbrowser,and sure the ping is ok as well.
    Jan Tang
    Greenhorn

    Joined: Sep 23, 2003
    Posts: 9
    I've just running the code in my uni and everything looks fine now. I think the problem is the connection from my home router to the db server.thank you everyone.
    [ May 10, 2006: Message edited by: Jayne Tang ]
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: connecting to oracle db problem