I\'m trying to connect to a database in Java, using jdbcTemplate and I\'m gettin the error below. I have Googled for a long time and all solutions I found didn\'t solve my p
This message can also be displayed, if, like me, you run your application with the Maven plugin for Tomcat:
mvn clean install tomcat7:run
and you have a provided scope element in your Maven dependency:
mysql
mysql-connector-java
5.1.36
provided
The provided scope will prevent the connector from being part of the war archive and the Tomcat plugin will find no connector to establish the database connection.
Simply removing the provided scope from the dependency solves the issue.