top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

MariaDB Connector Issues

0 votes
373 views

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.

posted Jun 1, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

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.

answer Jun 1, 2015 by Seema Siddique
Similar Questions
0 votes

Question, is building the source exactly the same as mysql? Meaning, if I build it with set CMAKE options building mysql, can I use those exact same options building mariab?

eg:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_LIBDIR=lib/mysql -DMYSQL_USER=mysql
-DMYSQL_UNIX_ADDR=/var/run/mysql.sock
-DMYSQL_DATADIR=/var/lib/sql/data -DWITH_DEBUG=0 -DWITH_SSL=system
-DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1

+1 vote

I did a test install of Fedora 19 on a spare machine and discovered that MySQL is no longer part of the Distro being replaced by MariaDB.

Has anyone tried to run WordPress in conjunction with MariaDB and if so any problems.

0 votes

I am a beginner at spark, and i need to use spark with mongodb as a data store for a project for the company i am interning at. I have setup spark as standalone and have setup mongodb on my windows machine, but i am not able to configure the spark-mongodb connector. Can someone please list the steps to do so?

I read the documentation on the official site but i am not able to figure it out.

...