Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connecting to oracle db problem

 
Jan Tang
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34671
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jayne,
Did the code print an exception, hang, etc? Tell us a little more about the symptoms of the problem.
 
Jan Tang
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • Check if your Oracle Service is running
  • Check if machine is available on network try pinging the machine ping 131.170.24.43



  • Shailesh
     
    Jan Tang
    Greenhorn
    Posts: 9
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 9
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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 ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic