Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Handle this Exception

 
KASI VISHWANATH
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know what is communication link failure, I get this error when access JDBC, I get an error with unexpectd sql exception raised along with the io exception of communication link failure.
sample : java.sql.SQLException: Error during query: Unexpected Exception: java.sql.SQLException message given: Communication link failure: java.io.IOException

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need more information.
From which method is this exception being generated?
If possible. A copy of your code would help.
Monty
------------------
 
KASI VISHWANATH
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monty

The method which contains a call to the connection object of the database is creating this error, this is what I feel. The code is too large for me to give it to you. So can you help me out and tell me
Vissu
 
Phil Owens
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method that creates the database connection must THROW a SQLException, and maybe an IOException from the sounds of your error message. Be sure to catch it somewhere as well!
Try something like this:
public Database() throws SQLException, IOException {
//do work
}
// end method

-Phil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic