Please provide information on how to use PostgreSQL as storage
Minecraftschurli opened this issue ยท 8 comments
Since PostgreSQL is now supported (I know you need your own JDBC Driver) it would be neat to have at least some documentation on how to include the JDBC Driver (LuckPerms has one included but that is relocated from org.postgresql
to me.lucko.luckperms.lib.postgresql
and is for that reason not usable)
The MariaDB drivers would be nice. I run MariaDB on my PaperMC server, and on dynmap 3.2-beta-2 the two problems I get are an error about using an outdated MySQL driver during initilization of the plugin on server reboot, and this annoying but constant error:
[dynmap]: Tile read error - The last packet successfully received from the server was 35,309,720 milliseconds ago. The last packet sent successfully to the server was 35,309,720 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
I get that if my server is online for more than a day. And yes, I have autoReconnect=true enabled in my settings.
Was hoping switching to MariaDB in the dynmap config would have fixed it, but as you guys found out, you get the error about the missing driver.
How did you enable PostgreSQL support within Dynmap? I could submit a pull request expanding the documentation.
I tried installing libpostgresql-jdbc-java
on my Debian server and passing -classpath /usr/share/java/postgresql.jar
to Java, but I keep getting the [dynmap] PostgreSQL-JDBC classes not found - PostgreSQL data source not usable
error.
That's my point I didn't and I can't find any documentation on how to do it. It says you can with your own JDBC but there is no plugin except LuckPerms that includes one (AFAIK) and LuckPerms' is not in the package Dynmap expects it to be so it's not found. It would be nice if I didn't need 2 Postgres JDBCs on my server if I use Dynmap and LuckPerms and it would be good if Dynmap provided its own extension plugin that enables Postgres.
Also during research I found out that --classpath
is ignored when using --jar
so I tried putting the JDBC jar in the plugins folder but that didn't work because the plugin loader expects each jar to have a valid plugin.yml
Ok, I just noticed that in b7e7039 mikeprimm finally bundled Postgres with Dynmap's Jar, nice!
Today I'll try to compile the repo and test it, if that works I think that no additional documentation should be needed :)
Using the latest build from https://dynmap.us/builds/dynmap and Postgres works perfectly :)
I think this issue can be closed.
Yep - when the PG support was originally done (via a PR), the dependency on the JDBC driver was up to the user to get and install (and what it took to add it was very platform specific). The new DEV build has the driver integrated in the Dynmap JAR on all platforms, so this should address that issue.
Or add a section for compiling on our own Dynmap from src with our drivers. Coming across the same issue #3023.
@mikeprimm Can the MariaDB driver come bundled with Dynmap in future versions as well (see #3023)?