I spent some time troubleshooting this same issue, and it was somewhat of a lost cause - certainly lost hours.
Unless things have changed recently, I believe the problem with the MariaDB JDBC driver is caused by this issue in the mybatis-guice helper that is used under the covers by Guacamole https://github.com/mybatis/guice/issues/589 This issue was actually opened by Mike Jumper, and has subsequently been closed as fixed with reference to milestone 3.19. However, no release 3.19 was ever made. They went straight to 4.0 The Guacamole client code still has a dependency on mybatis-guice-3.18.jar, or at least mybatis-guice-3, so it does not include the fix. So, unless Guacamole can move to mybatis-guice-4.0, which may have the fix, or get the mybatis-guice team to make a release 3.19, then you are stuck with using the mysql jdbc driver to talk to mariadb Vincent ________________________________ From: Tony Guadagno <[email protected]> Sent: Tuesday 14 October 2025 13:15 To: [email protected] <[email protected]> Subject: RE: [External] how do i include org.mariadb.jdbc.Driver in the guacamole container You don't often get email from [email protected]. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> Nick, thanks for your time, so I added this to my run command: -e GUACAMOLE_HOME="/opt/guacamole" Then created a lib dir in that path and copied the jar to that dir: [root@lnb-rdp lib]# pwd /opt/guacamole/lib [root@lnb-rdp lib]# ls mariadb-java-client-3.5.6.jar restarted the container but did not work… btw, you are of course correct, I can use mysql driver and that does seem to work. So, this is not strictly needed…but it is in the docs so I am wondering why it does not work. Anyway, thanks for your input, if you want me to try anything, I am more than happy to help Tony From: Nick Couchman <[email protected]> Sent: Tuesday, October 14, 2025 7:28 AM To: [email protected] Subject: Re: [External] how do i include org.mariadb.jdbc.Driver in the guacamole container On Mon, Oct 13, 2025 at 10:19 AM Tony Guadagno <[email protected]<mailto:[email protected]>> wrote: Hi, I am new to guacamole and docker so sorry if this is an easy one…but I am trying to use guacd/guacamole official docker containers with a native mariadb install. I am starting the guacamole instance this way: docker run --network=guac-network --name lnb-guacamole -e MYSQL_HOSTNAME="172.18.0.1" -e MYSQL_DATABASE="guacamole_db" -e MYSQL_USERNAME="guacamole_user" -e MYSQL_SSL_MODE="disabled" -e MYSQL_SERVER_TIMEZONE="America/New_York" -e LOG_LEVEL="debug" -e MYSQL_DRIVER="mariadb" -e MYSQL_PASSWORD="pw" -e GUACD_HOSTNAME="lnb-guacd" -d -p 8080:8080 guacamole/guacamole I thought I read that guacamole natively supports Mariadb but I guacamole is throwing errors and I see this in the logs: Caused by: java.lang.ClassNotFoundException: org.mariadb.jdbc.Driver at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) so it looks like the jdbc driver is not included in the container??? How do I include the mariadb jdbc driver in the container? It looks like we only download the MySQL driver at this point, so it looks like you'll either have to use the MySQL JDBC driver (which should be compatible with MariaDB), or you'll need to create a template GUACAMOLE_HOME directory and drop the MySQL driver into the "lib" directory of your template. I _think_ the following will work, but have not tried it out, yet, so might need some tweaking: * On your host system, create the /etc/guacamole directory, and create a "lib" folder in that directory. * Drop the MariaDB JDBC driver into the /etc/guacamole/lib directory. * At an option for your guacamole container to map /etc/guacamole from the host to /etc/guacamole in the container. That _should_ be it - the guacamole container should use /etc/guacamole as the template and that JDBC driver should be copied as part of that, and should start up correctly without that error. -Nick ________________________________ IT Solutions Email Disclaimer - This e-mail and any files transmitted with it contain information which may be confidential and which may also be privileged and is intended solely for the use of the individual or entity to whom it is addressed. Unless you are the intended recipient you may not copy or use it, or disclose it to anyone else. Any opinions expressed are that of the individual and not necessarily that of IT Solutions Ltd. If you have received this e-mail in error please notify the sender by return. For further information on IT Solutions visit https://www.itsolutions.ie<https://www.itsolutions.ie/> IT Solutions Email Disclaimer - The information contained in this email message, including any files transmitted with it, is confidential and may be legally privileged. This e-mail is intended only for the personal attention of the stated addressee(s). Any access to this email, including any files transmitted with it, by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the accuracy or completeness of the information contained in this email or any files transmitted with it. If you have received this email in error, please inform the sender immediately and delete it and all copies from your system. You may not forward this email without the permission of the authorised sender. The views expressed in this email are those of the author, and do not necessarily represent the views of IT Solutions or its affiliates. Internet communications are not secure and IT Solutions cannot therefore accept legal responsibility for the contents of this message nor for any damage caused by viruses. This email has been scanned at the originating end. For further information on IT Solutions visit https://www.itsolutions.ie
