Relative Content

Tag Archive for mysqljdbcservletsclassnotfoundexception

Servlet doGet() ClassNotFound on mysql:jdbc driver

I’m using Eclipse/Tomcat10/MySql and have added both Java jdbc libraries to my classpath. Major clue: This works as long as I refactor the servlet to a POJO, loading the driver in main(). When I refactor back to a servlet, suddenly the classloader can’t find the driver.