Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

Dynmap error "MariaDB-JDBC classes not found" with PaperMC 1.16.1

whalehub opened this issue · 7 comments

commented

Background

I'm running a Minecraft server on Debian 10 using Java 11, PaperMC 1.16.1, Dynmap 3.1-beta1-spigot and MariaDB 10.5.4. In my connections.txt file for Dynmap, I've been using type: mysql as the storage driver up until now and while that works well for me, I found out earlier today that it can be set to type: mariadb as well.

Problem

When I use mariadb instead of mysql in my connections.txt file, Dynmap spits out the following error message on startup:

java[8143]: [15:38:57 ERROR]: [dynmap] MariaDB-JDBC classes not found - MariaDB data source not usable
java[8143]: [15:38:57 ERROR]: [dynmap] Map storage initialization failure
java[8143]: [15:38:57 INFO]: [dynmap] Unloaded 0 components.
java[8143]: [15:38:57 INFO]: [dynmap] Disabled

A similar error message was reported by someone else in #1674, but that user was using Forge while I'm using PaperMC which is supposed to come bundled with the org.mariadb.jdbc driver.

Solutions I've tried

• Downloading the MariaDB JDBC driver .jar file manually and setting the CLASSPATH variable to its location.
• Specifying the CLASSPATH variable at runtime via java -cp </path/to/jar/file>.
• Creating a subfolder called lib in the Minecraft folder and copying the .jar file there.
• Installing the MariaDB JDBC driver with apt via the libmariadb-java package.

Any help with this issue would be appreciated.

commented

to use mariadb/mysql you need to install a mod on your server. this one works with the forge and fabric version of the game.
https://www.curseforge.com/minecraft/mc-mods/mysql-jdbc

commented

Please don't necropost, this is over one year old. :)

commented

At least it was actually useful.

commented

Can't you use the mysql mode? MariaDB should be able to work without issues

commented

Can't you use the mysql mode? MariaDB should be able to work without issues

@Tachi107 I already mentioned that the mysql option works fine with MariaDB in my bug report.

commented

You're right, I've realised that just after commenting. I didn't delete it because I would like to know why you would want to use the mariadb option instead of mysql (apart from correctness and the fact that looks better). Does the MariaDB JDBC driver provide better performance or something?
I think that instead of including a database driver for every single DBMS Dynmap should be able to use system libraries (like libmariadb-java, libpostgresql-jdbc-java, etc); this would also fix issues like this

commented

I didn't delete it because I would like to know why you would want to use the mariadb option instead of mysql (apart from correctness and the fact that looks better). Does the MariaDB JDBC driver provide better performance or something?

Yeah, according to some benchmarks I found online, the MariaDB JDBC driver performs better than the MySQL one. I'm gonna close this issue though because the PostgreSQL discussion that is linked earlier in this thread made me realize that Dynmap itself has to be compiled with the MariaDB driver for the mariadb option to work. Technically, the error message I received is the result of things working as expected and not a bug.