title: No suitable driver found for jdbc:mysql when running from single jar
body: <p>I have a Scala test project which writes some information to a mysql database. I set up the project with sbt, and use sbt-eclipsify so I can run it from eclipse. I also used the sbt plugin sbt-assembly to create a single jar with all the classes I need from the dependent jars. I can run the program with no problem from eclipse and from sbt.</p>
  
  <p>I run it from the single jar that sbt-assembly builds:</p>
  
  <pre><code>java -classpath target/test1-assembly-1.0-SNAPSHOT.jar example.InsertDataIntoDatabase
  </code></pre>
  
  <p>but it fails with:</p>
  
  <blockquote>
    <p>No suitable driver found for jdbc:mysql://localhost:3306/test</p>
  </blockquote>
  
  <p>My first thought was that sbt-assembly might have missed the mysql driver dependency, but I unzipped the jar, and found com/mysql/jdbc/Driver.class inside it. </p>
  
  <p>Is there some other dependency it could be missing?</p>
  
  <p>How can this be solved?</p>