title: Java Spring Error: Could not get JDBC Connection
body: <p>I am doing a small exercise using Spring framework and JDBC, and I got the following error:</p>
  
  <pre><code>    Exception in thread "main" org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: No suitable driver found for jdbc:mysql:3306//localhost/springcore
      at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
      at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:573)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:812)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:868)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:876)
      at springcore.springcore.EmployeeJDBCTemplate.create(EmployeeJDBCTemplate.java:23)
      at springcore.springcore.EmployeeApp.main(EmployeeApp.java:23)
  Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql:3306//localhost/springcore
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:164)
      at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
      at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
      at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
      at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
  </code></pre>
  
  <p>My pom.xml:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;springcore&lt;/groupId&gt;
    &lt;artifactId&gt;springcore&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;springcore&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
        &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
        &lt;/properties&gt;
  
        &lt;dependencies&gt;
          &lt;dependency&gt;
            &lt;groupId&gt;junit&lt;/groupId&gt;
            &lt;artifactId&gt;junit&lt;/artifactId&gt;
            &lt;version&gt;3.8.1&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;4.1.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- MySQL database driver --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;5.1.9&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
              &lt;version&gt;3.2.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
        &lt;/dependencies&gt;
      &lt;/project&gt;
  </code></pre>
  
  <p>and Beans.xml: </p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd "&gt;
  
     &lt;!-- Initialization for data source --&gt;
     &lt;bean id="dataSource" 
        class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
        &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&gt;
        &lt;property name="url" value="jdbc:mysql:3306//localhost/springcore"/&gt;
        &lt;property name="username" value="root"/&gt;
        &lt;property name="password" value=""/&gt;
     &lt;/bean&gt;
  &lt;!-- Definition for employeeJDBCTemplate bean --&gt;
     &lt;bean id="employeeJDBCTemplate" 
        class="springcore.springcore.EmployeeJDBCTemplate"&gt;
        &lt;property name="dataSource"  ref="dataSource" /&gt;    
     &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>Database: MySQL, I use Xampp and phpmyadmin to manage the database!
  IDE: esclipse, Maven project!</p>
  
  <p>Am I missing libraries or something?</p>
  
  <p>Please tell me where am I getting wrong! :D
  Thanks in advance! </p>