java - mysql-connector strange behaviour in Tomcat -


i trying deploy app tomcat.everything works fine, except expected have error after deleting connector file(mysql-connector-java-5.1.40) web-inf>lib directory, but,surprise, still working without it. so, question if tomcat saving conector elsewhere(i ve searched in tomcat directories , found nothing). start tomcat use startup.bat bin directory of tomcat. simple code mysql db connection:

public void jspinit() throws jspexception{         try{             class.forname("com.mysql.jdbc.driver");             con=drivermanager.getconnection("jdbc:mysql://localhost:3306/test","root","");             pst.con.preparestatement("insert employee values(?,?,?)");         }         catch(exception e{             e.printstacktrace();         }      } 

if left tomcat running deleted mysql driver jar, tomcat nevertheless have java bytecode loaded in jvm. did restart tomcat when deleted jar?

update

look for...

  • a copy of jdbc driver jar in shared classpath location, e.g. tomcat/shared/lib
  • a second copy of jdbc driver jar (with different name) in webapp
  • do perhaps have classpath environment variable set on machine? perhaps project?

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -