Impossible to connect to a Microsoft Access database in LibreOffice 25.2 with UCanAccess and jdbcDriverOOo 1.6.2

I need to edit the content of a MDB file under Debian Linux 12 with LibreOffice 25.2.

I tried to use the solution mentioned in the documentation (relying on UCanAccess) without success: I added the loader folder containing ucanload.jar into the classpath of the JRE and I obtained the error message “Impossible to load the JDBC driver” when I clicked on the button “Test the class”:

Exception in thread "Thread-0" java.lang.NoClassDefFoundError: net/ucanaccess/jdbc/UcanloadDriver
Caused by: java.lang.ClassNotFoundException: net.ucanaccess.jdbc.UcanloadDriver
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)

Unlike what the documentation advises, I added ucanload.jar into the classpath instead of its folder, the JDBC driver was successfully loaded, I got rid of the ClassNotFoundException.

I used jdbc:ucanaccess:///home/gouessej/Downloads/KAR.MDB in the jdbc field, but I got the error message “Impossible to establish the connection”.

Then, I tried to use the LibreOffice extension named jdbcDriverOOo, I added the instrumentation JAR manually as my version number of LibreOffice is below 25.8 and I got the error message “Impossible to establish the connection”. I entered the URL ///home/gouessej/Downloads/KAR.MDB for the file /home/gouessej/Downloads/KAR.MDB, the log shows that this extension uses it to create the JDBC URL xdbc:ucanaccess:///home/gouessej/Downloads/KAR.MDB. OpenJDK 21.0.9 (the JDK, not only the JRE) is installed on this machine, I tried with a JRE too.

How can I solve the problem? In my humble opinion, there’s at least one trivial documentation bug to solve.

No problem to connect here with the following steps:

  1. Downloaded latest UCanAccess-5.0.1.bin.zip.
  2. Unzipped the *.zip file.
  3. Tools → Options → LibreOffice → Advanced → ClassPath (added UCanAccess-5.0.1.bin/loader/ucanload.jar (it’s an archive - not a folder))
  4. Database properties jdbc: ucanaccess:///home/robby/Dokumente/LibreOffice/Access/empty.mdb and JDBC driver class: net.ucanaccess.jdbc.UcanloadDriver

Connection to the “empty.mdb”-file works well.

@RobertG Thank you. I know that ucanload.jar is an archive, I already did what you suggested with my own mdb file and I even reported the documentation bug today. I just see one difference, you use ucanaccess:// as a prefix instead of jdbc:ucanaccess://, right? When I omit jdbc:, I get

Error code: -1

'org.hsqldb.persist.HsqlProperties org.hsqldb.DatabaseURL.parseURL(java.lang.String, boolean, boolean)'

Where can I find detailed logs? When I run soffice in command line, I don’t get much informotion.

This is how it looks here in properties of the Base file:


There should appear nothing about HSQLDB.
jdbc: will be added automatically when choosing JDBC connection. See screenshot.

What happens when you click on “Test the connection” (i.e “Verbindung testen” in German)?

Please note that in my case those fields are in two distinct pages of the wizard, the username can be entered after validating the data about the JDBC driver and the connection URL.

The connection was established successfully.

appears when testing the connection.
I haven’t installed any extension (jdbcDriverOOo) here. Works well without this extension.

I’ve just uninstalled the extension in order to be sure that it doesn’t cause any perturbation. Have you ever tested with a non empty mdb file? I’d like to access to much more detailed logs to see what is wrong in my case. Which version of LibreOffice do you use?

empty.zip (5.9 KB)
Here is the database file empty.mdb (zipped, because *.mdb isn’t allowed) - only one table with one entry I made.
But it also works with the following accdb-file:
Contact.accdb.zip (138.5 KB)
Only 2 tables and a view, no content.

Connection could be established.

No other Access files available here, because I never used Access. Only tested it for the German Base Handbuch.

Version: 25.8.4.2 (X86_64)
Build ID: 290daaa01b999472f0c7a3890eb6a550fd74c6df
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 24; OS: Linux 6.12; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Debian package version: 4:25.2.3-2+deb13u3
Calc: threaded

Your files don’t work with my version of LibreOffice. I’m going to try to use a more recent version.

@RobertG Thank you, it works like a charm with your advice (i.e removing jdbc: from the prefix) and LibreOffice 25.8.