JDBC driver cannot be loaded

Hello,
I am on Linux Kubuntu 22.04 and LibreOffice 7.4.1. and have been using both the Mysql- and the Mariadb-JDBC connectors to Base in the past for years with no problems.
Now, all of a sudden, I keep getting the dreaded “…connector cannot be loaded…” message. I have of course set the Java runtime environment (i.e. Oracle Corporation 1.8.0_321) and Classpath parameter (i.e. /usr/share/mariadb/mariadb-java-client-3.0.7.jar in my case, with that file obviously also present).
Now, when trying to open an .odb file and tables within it, I keep getting the above error message. Any ideas?
Thanks in advance
H. Stoellinger

LibreOffice as a container app? Forget it or configure it.

No, LibreOffice - in my case - is NOT a container app…

Good to know.
When I disable Java and restart the office I get the following error when accessing a JDBC database:

The connection to the external data source could not be established. An unknown error occurred. The driver is probably defective. /home/buildslave/source/libo-core/connectivity/source/commontools/dbexception.cxx:400

When I enable Java but remove the driver from the LO class path and restart the office I get this:

The connection to the external data source could not be established. An unknown error occurred. The driver is probably defective. /home/buildslave/source/libo-core/connectivity/source/commontools/dbexception.cxx:400

But I do not get

Hello again,
After a lot of fiddling around I changed the connector to “mysql-connector-java-5.1.46-bin.jar”. Now everything works o.k. Don’t know why the mariadb-connector doesn’t work in my case…
Thanks anyway for trying to help
H. Stoellinger

Hi All,
My flavor is Ubuntu 20.04 with LO 7.4.3.2 where I was having trouble with Base crashing every time I updated a small table. After some deliberation I moved to MariaDB but had trouble connecting to it from Base. I thought perhaps I needed proprietary java instead of openjdk as my runtime environment in order to use the Maria-JDBC connector? I purged mysql and a trial of mariadb from my system - doing a fresh install of mariadb alone.
Trying to select the mariadb-java-client-2.5.3.jar after installing the libmariadb-java package (through LO Tools > Options > LibreOffice > Advanced) was not possible using the Add… button. I had seen references to USING the jar file, but not how to do it. Finally I stumbled on the Class Path button where Add Archive… was the option I needed to add my mariadb jar file in order to make the connection. It now coexists peacefully with the previously unhelpful mysql-connector-j-8.0.31.jar reference.
Trying to create a new Base file to use the MariaDB database gives on the option of connecting via JDBC, ODBC, Oracle JDBC, Mysql/MariaDB, and others, but most did not work to connect to the database.
My next move was going to be trying the Connector/J download from Maven or try ODBC, but it seemed like a major task just to get a connector that I could see was already in my /usr/share/java folder.

Hopefully this missive will help others trying to install their MariaDB JDBC driver at least on Ubuntu LO.

The last time I tried to connect to MariaDB with JDBC, I had to use mariadb-java-client-2.7.7.jar, because the newer connectors didn’t work.

On the other hand, remember that if you use MariaDB connector, the JDBC driver should be org.mariadb.jdbc.Driver instead of the default written one.

You can also connect directly, for which you don’t need any JDBC or ODBC driver, it is the third option you have.

Although I am not a regular Linux user, you may have to install the mysql connector (yes, it is the same connector as for mariaDB):
sudo apt install libreoffice-mysql-connector