guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Couchman <vn...@apache.org>
Subject Re: Possible to use MariaDB Connector vs MySQL Connector?
Date Tue, 11 Jun 2019 18:42:20 GMT
On Tue, Jun 11, 2019 at 2:19 PM Zer0Cool <melin3710@gmail.com> wrote:

> Here is the error I get in /var/log/messages when loading the Guac
> website/login page.
>
> t-guac server: ### Error querying database.  Cause: java.sql.SQLException:
> Error setting driver on UnpooledDataSource. Cause:
> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
>

Yes, this is kind of what I would expect - the MariaDB connector has
changed to the package name listed below, so code has to be tweaked to
allow that.


>
> I am by no means an expert but I think the issue is
> "com.mysql.jdbc.Driver".
> According to this:
> https://mariadb.com/kb/en/library/about-mariadb-connector-j/#external-pool
> I
> seems it would work with/expect "org.mariadb.jdbc.Driver" and the site
> states:
>
> "Please note that the driver class provided by MariaDB Connector/J is not
> com.mysql.jdbc.Driver but org.mariadb.jdbc.Driver!"
>
> I have all the files in the same place I would otherwise, set SEL to
> permissive just in case and double checked ownership and permissions and
> see
> no issues like that. From what I can tell it doesnt seem like MariaDB
> Connector J is compatible with Guacamole, maybe due to the above?
>

Saying it's not compatible is a bit of a stretch.  There are a couple of
things:
- First, as I noted before, we abstract away most of the JDBC concerns to
the MyBatis project, so the code that actually references the
com.mysql.jdbc.Driver package is not actually anywhere in Guacamole (I
don't think, anyway - could be wrong), but is actually in the MyBatis
code.  That said, there should be ways to work around it.
- There's not actually any incompatibility, here, I wouldn't say - the
connector will work fine once it's loaded - it's just a matter of loading
the proper connector.

I'm not sure off the top of my head if later versions of MyBatis account
for this change or not, or give any flexibility for finding/selecting the
right one, but, if not, we could likely do something in the Guacamole code
to either allow for specifying or auto-select the correct one.  It's worth
putting in a JIRA issue for this, I would say.

-Nick

Mime
View raw message