aspose file tools*
The moose likes JDBC and the fly likes java.sql.SQLException: Io exception: Got minus one from a read call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: Io exception: Got minus one from a read call " Watch "java.sql.SQLException: Io exception: Got minus one from a read call " New topic
Author

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

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 726
Hello,

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



Thanks & best regards
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 726
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

Joined: Oct 27, 2005
Posts: 19556
    
  16

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

Joined: Mar 22, 2008
Posts: 726
Thanks Rob Spoor. Your help is always appreciated!!

Best regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: Io exception: Got minus one from a read call
 
Similar Threads
What exactly am I supposed to do?
The Request Resource is not available.
htaccess and mod_rewrite issue
Struts Action Question
org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed