• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mysql connection

 
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic