title: Java DriverManager does not load Mysql driver
body: <p>Java DriverManager does  not load Mysql driver</p>
  
  <pre><code>DriverManager
      static {
          loadInitialDrivers();
          println("JDBC DriverManager initialized");
      }
  </code></pre>
  
  <p>Mysql jdbc driver is under Tomcat library.</p>
  
  <pre><code>  tomcat/lib/mysql-jdbc.jar
  </code></pre>
  
  <p>From debugger,  Before calling DriverManager.getDriver(URL), a breakpoint is
  set in the method loadInitialDrivers(), but execution is not stopped there. It is static method, when the class is loaded, and the static method is called?</p>
  
  <p>The list of loaded drivers (<code>registeredDrivers</code>) is empty.</p>
  
  <h2>UPDATE</h2>
  
  <p>Add ojdbc6.jar into tomcat/lib, and then restart tomcat. DriverManager did not
  load the driver either. What might be the problem? It seems that tomcat is ignoring all JDBC jars under tomcat/lib directory. </p>
  
  <p>Also tried: copy jdbc drivers to webapps/myapp/WEB-INF/lib, it did not help.</p>