title: Java database error : java.sql.SQLException: Io exception: Bad packet type
body: <p>I randomly got this error </p>
  
  <pre><code>java.sql.SQLException: Io exception: Bad packet type
  </code></pre>
  
  <p>I did some research, someone suggested a solution:</p>
  
  <blockquote>
    <p>To correct this problem we have to ensure that only one thread of execution was making use of the JDBC driver at a time through the same Connection OR upgrade to a later version of the driver.</p>
  </blockquote>
  
  <p>Can anyone guide me in how to ensure that only one thread of execution was making use of the JDBC driver at a time ?</p>