• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: Io exception: Got minus one from a read call

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am frequently getting this error and many pages stop working.



Thanks & best regards
 
Rob Spoor
Sheriff
Pie
Posts: 20750
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are CvDAO and UserDAO your own classes? Because I'll tell you this: -1 is a perfect valid return value for the read methods of both InputStream and Reader. It indicates that all data has been read, and it's by no means an error. Well, unless you expected more data, in which case an EOFException is the best exception to throw.
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob for assisting

This error is not throwing only these classes but all the classes that I try to display are working for a while and then for sometime showing this error.

Thanks again
 
Rob Spoor
Sheriff
Pie
Posts: 20750
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I repeat my first question:
Rob Spoor wrote:Are CvDAO and UserDAO your own classes?

If so, you must check your methods to see if the -1 reads are really errors or not.
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob Spoor. Your help is always appreciated!!

Best regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic