I've built my app using eclipse. I now want to run it directly on tomcat on a production server without eclipse. I have exported a war file, and managed to deploy it, it runs the non db part of the code but fails on establishnig a db connection java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:278)
The only advice I can find is 1. check the connection URL 2. check you've got the database connector jar in the right place.
i have checked the connection URL, indeed I have written a stanalone version to run on the command line and that works running the same code my Rest stuff calls. i.e I compiled and ran it using the classpath for my "Gee" app /var/lib/tomcat7/webapps/Gee/WEB-INF/lib and classes. But it wont run in tomcat. I have stuck the mysql-connect jar file in every likely directory. I have also moved it away from the above directories and recomplied my standalone, unsuccessfuly, to prove to myself that that is where the code is coming from. It's definetely not the conenction URL, the DB is there, I even ran my test program as user tomcat7.
What diagnostics can I stick in my program before trying to open a hibernate session to see where C3P0 (I assume) is looking for db connectors.
|