You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Jason Haar <ja...@trimble.com> on 2023/01/15 21:03:44 UTC

guacamole cannot use yum-version of mariadb-java-client under RockyLinux9 (but 8 is fine)

Hi there

[summary: mariadb-java-client rpm in RockyLinux9 doesn't work, but if you
copy mariadb-java-client.jar from RockyLinux8 it does. So is this a Rocky9
bug or something specific to guacamole?]

We have a scripted guacamole installer for RockyLinux8 to use the "Redhat
supported" rpm-based java/tomcat/mariadb/guacd rpms - and then just layer
guacamole-server (as the only non "yum" app) on top of that. We use a range
of extensions and rely on the JDBC mariadb connector. As it's scripted, all
the extensions we use end up in the "extensions/" dir, and the JDBC
connector in the "lib/" directory, configs are auto-generated, etc.

Anyway, this all works fine on Rocky8, but we're trying to replace it with
Rocky9 and ran into a problem. It all comes up, but the SQL calls all fail
- with the infamous

Error querying database.  Cause: java.sql.SQLException: No suitable driver
found for jdbc:mysql://127.0.0.1:3306/guacamole

Packet sniffer shows not even a single port 3306 packet  - so this error is
happening earlier (ie cannot be database channel related). And yes we do
have "mysql-driver: mariadb" in guacamole.properties

After messing around for some time I thought to try
replacing mariadb-java-client.jar file with the RockyLinux8 version and
that fixed the problem. Rocky8 has mariadb-java-client-2.7.1-2.el8 and
Rocky9 has mariadb-java-client-3.0.3-1.el9

Has anyone else run into this? It must be a bug - but I'm not sure it's
because there's a bug in mariadb-java-client-3.0.3-1.el9, or that
guacamole-1.4.0 doesn't support "v3" yet?

Thanks

-- 
Cheers

Jason Haar
CyberSecurity Manager, Trimble Ltd.
Phone: +1 408 481 8171
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

Re: guacamole cannot use yum-version of mariadb-java-client under RockyLinux9 (but 8 is fine)

Posted by Jason Haar <ja...@trimble.com>.
Wow - fast answer there Mike - thanks! We'll keep a copy of the RockyLinux8
version around then

On Mon, Jan 16, 2023 at 10:17 AM Michael Jumper <mj...@apache.org> wrote:

> On Sun, Jan 15, 2023, 1:04 PM Jason Haar <ja...@trimble.com> wrote:
>
>> ...
>> Error querying database.  Cause: java.sql.SQLException: No suitable
>> driver found for jdbc:mysql://127.0.0.1:3306/guacamole
>> ...
>> After messing around for some time I thought to try
>> replacing mariadb-java-client.jar file with the RockyLinux8 version and
>> that fixed the problem. Rocky8 has mariadb-java-client-2.7.1-2.el8 and
>> Rocky9 has mariadb-java-client-3.0.3-1.el9
>>
>
> This is because MariaDB Connector/J 3.x has dropped support for the
> "jdbc:mysql:" URI format, now requiring that code using the driver either
> use "jdbc:mariadb:" or explicitly specify a "permitMysqlScheme" attribute:
>
>
> https://mariadb.com/kb/en/about-mariadb-connector-j/#jdbcmysql-scheme-compatibility
>
> The "JDBCHelper" class from MyBatis Guice that we've been using uses
> "jdbc:mysql:" for both the MySQL and MariaDB versions of the driver, hence
> the failure. Code changes on either our side or within MyBatis would be
> needed to be compatible with 3.x.
>
> The 2.x version of the driver should work perfectly.
>
> - Mike
>
>

-- 
Cheers

Jason Haar
CyberSecurity Manager, Trimble Ltd.
Phone: +1 408 481 8171
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1

Re: guacamole cannot use yum-version of mariadb-java-client under RockyLinux9 (but 8 is fine)

Posted by Michael Jumper <mj...@apache.org>.
On Sun, Jan 15, 2023, 1:04 PM Jason Haar <ja...@trimble.com> wrote:

> ...
> Error querying database.  Cause: java.sql.SQLException: No suitable driver
> found for jdbc:mysql://127.0.0.1:3306/guacamole
> ...
> After messing around for some time I thought to try
> replacing mariadb-java-client.jar file with the RockyLinux8 version and
> that fixed the problem. Rocky8 has mariadb-java-client-2.7.1-2.el8 and
> Rocky9 has mariadb-java-client-3.0.3-1.el9
>

This is because MariaDB Connector/J 3.x has dropped support for the
"jdbc:mysql:" URI format, now requiring that code using the driver either
use "jdbc:mariadb:" or explicitly specify a "permitMysqlScheme" attribute:

https://mariadb.com/kb/en/about-mariadb-connector-j/#jdbcmysql-scheme-compatibility

The "JDBCHelper" class from MyBatis Guice that we've been using uses
"jdbc:mysql:" for both the MySQL and MariaDB versions of the driver, hence
the failure. Code changes on either our side or within MyBatis would be
needed to be compatible with 3.x.

The 2.x version of the driver should work perfectly.

- Mike