Hi everyone,
I'm currently taking a class to learn
java but I'm at a point I don't know if I can move forward. I'm receiving an error "java.sql.SQLException: Cannot create
JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc://localhost:3306?autoReconnect=true' "
I tried Googling and found a few of the same questions at StackOverflow but the suggestions do not help me.
I'm using MySQL 5.7.13, Workbench is 6.3 and MySQL
mysql-connector-java-5.1.39-bin.jar is in both my WEB-INF folder and now ( as suggested on a StackOverflow ) in my
Tomcat lib folder
Tomcat is under C:\tomcat-8.0
context.xml is under META-INF
My LocalMySQLCP class file has some unused variables on it currently. As part of our lesson we refactored a class file from trying to connect one way ( where the user name, password, database URL etc is on the class ) to trying to connect using information in the context.xml. My instructor said it looks like my
servlet is trying to connect via. the old way and perhaps I may have left some code on my LocalMySQLCP class file but I can't see anything.
It does seem to connect as a browser comes up but then the error is shown on the console.
I don't see anything here that would use the old way of connecting. Any suggestions please?
My context.xml
My Servlet