How do I use the new MariaDB JDBC driver?

2017-05-29
QueueMetrics 17.x implements a number of changes that are meant to make the system perform better and use modern architectural components. One of them is the JDBC driver, that is the piece of software that lets QueueMetrics access the database.
On most systems, if QueueMetrics is installed using the default database credentials, those changes are implemented automatically. If instead you rely on custom database credentials, you will need to tell QueueMetrics to access the database using the new JDBC driver.
In order to do this, you need to edit the file WEB-INF/tpf.properties and change the line that says: JDBC_URL=jdbc:mysql://localhost/queuemetrics?autoReconnect=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude to something like: JDBC_URL=jdbc:mariadb://127.0.0.1/queuemetrics?user=queuemetrics&password=javadude&sessionVariables=sql_mode=''&autoReconnect=true Please note that it is not enough to just change the string "jdbc:mysql" to "jdbc:mariadb" as the connection parameters accepted by each driver are different.
After the change, restart QueueMetrics.

As an alternative, you may want to install the old MySQL Connector/J driver manually; in this case, it is enough to dowload it from the official site and add the JAR to the WEB-INF/lib folder in QueueMetrics, and then restart (but you will have to do it manually on every install).