title: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
body: <p>Im building Maven Java Web application and when I do </p>
  
  <pre><code>Class.forName("com.mysql.jdbc.Driver");
  </code></pre>
  
  <p>I get </p>
  
  <pre><code>java.lang.ClassNotFoundException: com.mysql.jdbc.Driver 
  </code></pre>
  
  <p><code>mysql-connector</code> is added to my <code>pom.xml</code> file like this </p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;mysql&lt;/groupId&gt;
      &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;version&gt;5.1.32&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>But I keep getting this. I even tried downloading <code>mysql-connector</code> and adding it manually to project, but it doesn't change anything.</p>
  
  <p>I also have the same app without Maven, and same code works fine</p>