File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes mysql connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mysql connection" Watch "mysql connection" New topic
Author

mysql connection

Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
I'm back to square one again. I had mysql running and working great last night. Now whenever I try to run my program I get an error message:
java.sql.SQLException: Communication link failure: java.io.IOException, underlying cause: Unexpected end of input stream
Do I have something set up wrong? Could this be caused from the firewall protection that keeps popping up?
David DeCesare
Greenhorn

Joined: May 25, 2001
Posts: 13
Did you leave the connection open all night? MySQL can be configured to drop connections that have been idle for a defined period of time. I believe the default time is 8 hours of inactivity (connections that are idle for 8 hours get dropped). Try reconnecting to the database to see if that fixes your problem.
It test this condition in your code, you could run the .isClosed() method on your Connection object.
David
Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
I tried the .isClosed() but got the same error. I think mysql has has been connected since I got it started on Saturday. Every day when I try it even before I start mysql I get the same error. I think if mysql was disconnected I would be getting the other error that I was getting before Saturday. I have closed it using the X button and have looked for ways to shut it down to start over but haven't found anything.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mysql connection