Tomcat 7 on Gentoo cannot find Vertica JDBC Driver
I've been working on some stuff related to Clojure,Scala and HP Vertica for work. I ran into the problem where my SBT+Jetty
dev server worked happily, but when packaged as a WAR and deployed to a Tomcat 7 container my webapp wouldnt come up.
When deploying my app, I copied the JDBC driver to $CATALINA_HOME/lib which is the usual location to put JDBC drivers, as this version of Tomcat AFAIK does not read runtime Jars from WEB-INF/lib.
The error message I got was:
I'll start with a disclaimer that I am not much of a Gentoo guru, but it is what it is. Searching in the catalina logs, I found:
After being confused about why Tomcat was not finding my Jar, I read /etc/init.d/tomcat-7-main which lead me to /usr/share/tomcat-7/package.env. I didn't realize but it seems individual Jars are being
specified in this file. I appended my Vertica Jar, and it started working: