File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Failing

 
deepak carter
Ranch Hand
Posts: 165
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have wriiten a sample program just fro testing its not showing any result




I was reading some blog and it was written there that we have to download some drivers. from where we have to download drivers and what drivers we have to download and where we have to place those drivers


thanks in advance

[moderator edit: added code tags]
 
Jan Cumps
Bartender
Posts: 2577
11
C++ Linux Netbeans IDE
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepak,


In the catch block, you can print the exception you are getting. Currently it is empty, so you are running blind.
Can you show us the error message?

I added code tags to your post to make it more readable.

 
Tina Smith
Ranch Hand
Posts: 208
9
Eclipse IDE Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't have drivers, that's probably a problem, and your stack trace will probably be a ClassNotFoundException on line 09.

Since this is an Oracle database you will need to download the ojdbc6.jar or ojdbc14.jar (6 is newer) and put it in your classpath.
 
deepak carter
Ranch Hand
Posts: 165
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

its not showing any error code is compiling fine , but it shuld error the result which its not showing...the console ouptut screen is coming where its just written press any key to continue.
 
Jan Cumps
Bartender
Posts: 2577
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deepak carter wrote:Hi,

its not showing any error code is compiling fine , but it shuld error the result which its not showing...the console ouptut screen is coming where its just written press any key to continue.


Yes, because you don't print the errors.
See my previous advise:
In the catch block, you can print the exception you are getting. Currently it is empty, so you are running blind.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic