Apparently with Tomcat7/8 and Java 7+ (we are using java8) you must explicitly
add the driver in the code:
Class.forName(org.mariadb.jdbc.Driver).newInstance();
I feel like this is a bug with Tomcat7/8 since after Java 6 this was no longer
required (and indeed worked in Tomcat5 and 6). Anyway, if anyone else runs
into that problem they can resolve it.
Thanks,
Nick
From: Cuneo, Nicholas [mailto:ncu...@tycoint.com]
Sent: Monday, June 01, 2015 1:24 PM
To: Tomcat Users List
Subject: MariaDB Connector Issues
Hi,
We've been running for a while now using embedded Jetty but due to some
upcoming infrastructure changes we're migrating to Tomcat 7. I'm having an
issue getting my servlet to recognize the mariadb connector
No suitable driver found for jdbc:mariadb://
This has been running in the past with Jetty, so I haven't made any code
changes. I've dropped the mariadb-java-client-1.1.8.jar in the tomcathome/lib
directory as in my experience in the past this was all I needed to do. However
since I'm still getting this exception I'm not sure how to debug further. I've
tried running tomcat with the debug option
bin/catalina.bat debug
but I'm not really sure how to use it properly other than running my servlet
and viewing the classpath.
Any assistance on the matter would be helpful.
Thanks,
Nick Cuneo / Software Engineer, Cloud / Enterprise Software
Tel: +1 949 517 4802 / Mobile: +1 949 243 4952
3 Ada / Irvine, CA 92618 / USA
ncu...@tycoint.commailto:ncu...@tycoint.com /
www.tyco.comhttp://www.tyco.com
[cid:image001.png@01D09C6E.3CAA8C50]
This email (including any attachments) may contain information that is private
or business confidential. If you received this email in error, please delete it
from your system without copying it and notify sender by reply email so that
our records can be corrected
This e-mail contains privileged and confidential information intended for the
use of the addressees named above. If you are not the intended recipient of
this e-mail, you are hereby notified that you must not disseminate, copy or
take any action in respect of any information contained in it. If you have
received this e-mail in error, please notify the sender immediately by e-mail
and immediately destroy this e-mail and its attachments.
This e-mail contains privileged and confidential information intended for the
use of the addressees named above. If you are not the intended recipient of
this e-mail, you are hereby notified that you must not disseminate, copy or
take any action in respect of any information contained in it. If you have
received this e-mail in error, please notify the sender immediately by e-mail
and immediately destroy this e-mail and its attachments.