title: ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
body: <p>I was trying to do some basic database operations. I'm using STS 3.2.0, Apache Tomcat 7.</p>
  
  <p>My dispatcher-servlet.xml includes:</p>
  
  <pre><code>&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://localhost:3306/mydb" /&gt;
          &lt;property name="username" value="root" /&gt;
          &lt;property name="password" value="root" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Apache Tomcat fails miserably with thousands of exceptions, starting with this one :</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
  Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/LboWV.png" alt="And these are my library definitions"></p>
  
  <p><strong>EDIT 1:</strong> I also downloaded 3.0.3.RELEASE version of the jar, and its still the same.</p>
  
  <p><strong>FINAL EDIT</strong> It seems, you should add your external jar files manually to your deployment directory as well (well if you don't use any extension that'd do that for you)</p>