User getting "The connection to the data source "MOW" could not be established."

I see several threads with this error but not sure which ones are relevant.

I have a LO base that I converted (thanks to EXCELLENT help from you all) from internal HSQLDB to external. It works fine … for me.

We have one other user who now cannot use the database. She can open it but when she tries any query or report she gets the subject error followed by

"The driver class “org.hsqldb.jdbcDriver” could not be loaded.The additional driver class path is “file:///G:/Shared%20drives/Lead%20Drivers/ExternalDB/driver/hsqldb.jar”."

We are both running Windows. The database is in Google Drive that we each access as drive G: We are both Managers for the Google Drive folder.

I suspected an access rights problem but we both seem to have the Manager – the highest – access rights for all of the folders. The folders are set up exactly as you suggest and as the internal to external macro created them.

    Directory: G:\Shared drives\Lead Drivers\ExternalDB

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         3/15/2026   3:53 PM                database
d-----          2/2/2026   5:45 AM                driver
------          3/1/2026   2:20 AM         397706 MOW.odb

Free HSQLDB 0.4 shows the Connection URL as jdbc:hsqldb:file:G:\Shared drives\Lead Drivers\ExternalDB\database\MOW;default_schema=true;shutdown=true;hsqldb.default_table_type=cached;get_column_name=false

and the database driver jar as

file:///G:/Shared%20drives/Lead%20Drivers/ExternalDB/driver/hsqldb.jar

I’m too much of an amateur to guess what change might improve things.

Any ideas as to how to resolve this?

Thanks again, as always,
Charles

All that is in the driver folder is hsqldb.jar. Do I need org.hsqldb.jdbcDriver also? Additional java files?

I would really appreciate any help you can give me. I can’t duplicate the problem. I just tried with an old machine I have but it is Windows 10 and Google Drive does not seem to work. I hate to keep telling my associate “try this” and “try that” when I have no idea what I am doing.

Thank you very much,
Charles

Store the driver on your local machine. hsqldb.jar is the actual software you are using through Base. hsqldb.jar provides org.hsqldb.jdbcDriver.

@Villeroy, thanks.

I have now spent a bunch of time hands-on on the failing user’s laptop. The problem is that it is just not finding the hsqldb.jar file. I have copied the file to her C drive LibreOffice/program/classes file. I have used your excellent macro to set the driver path to that folder. It works on my machine, which has exactly the same LibreOffice path setup. I am sure my machine is loading the jar from that path because if I rename the jar on my machine it fails.

Why would her machine be unable to load the jar? It’s Windows 11 just like my machine. I checked all of the permissions and they seem identical to my machine — and “nothing special.” No one has done anything “clever” with the permissions AFAIK.

I think this has been the problem all along. The driver path in the DB used to point to the driver folder created by your internal-to-external DB creation tool (on the G: Google Drive). It worked for me. It did not work for her.

She was completely able to use the DB when it was internal HSQLDB, but not once I made it external AND updated HSQLDB to the current version. (Unfortunately there was no test run after the change to external and before the update.)

What the heck should I be looking for?

Thanks much!
Charles

Replacing the built-in hsqldb.jar destroys the capability to use embedded HSQL. Keep it smart, simple and separated.
Your HSQL database has 2 text files, properties and script. Properties describes the last working version.
When you open the hsqldb.jar with a zip tool, the file META-INF/MANIFEST.MF has a row describing the version: `Implementation-Version: 2.4.1
Simply use my FreeHSQL macro in order to link the right database to the right driver. Read-only access to hsqldb.jar suffices.
Version 2.4.1 was the last version able to convert databases of version 1.8 (that’s the version of any embedded HSQLDB).
Having a HSQL 2.0 database or later, you can upgrade to a more recent one.

I don’t use any service of that company. I don’t know if this is a valid method to share a database. I never tried with any cloud service. I do run a local HSQL server.

@Villeroy, it IS linked to the correct version.

version=2.7.4
Thanks for the tip. Good to know where to find that.

FREEHSQLDB shows
file:///C:/Program%20Files/LibreOffice/program/classes/hsqldb.jar

C:/Program Files/LibreOffice/program/classes on my machine and on hers both have exactly the same hssqldb.jar, the jar for HSQLDB v2.7.4

It works on my machine. It fails on hers with the above messages.

What the heck do I do?
Charles

:grey_question:

Yes, I have tried both. Both work on my machine. Both fail on her machine. Both folders have the correct jar file.

Does anyone know what version of Java is required by HSQLDB v2.7.4? I don’t see the info right off on the HSQLDB site.

Does it seem possible that this is a Java version problem? I don’t know what version of Java my other user has – I just thought of the question this morning.

The HSQLDB site talks about some additional jars. Does LibreOffice Base with HSQLDB require any jars other than hsqldb.jar?

Thanks for all of your help. We are really getting desperate. I have a direction from leadership that if I cannot solve this problem that I am to look into getting someone to set up MS-Access for us.

Charles

Did you check Java is enabled on her LO classpath?
JavaPath

@CRDF I have not. I only thought of the Java issue this morning and she is on the other side of town and probably still asleep. I know how to check her version of Java; I just have not had a chance yet to do so. (It’s 6:03 AM here.)

She was working fine with the embedded HSQLDB, so I assume she has a working Java on her machine and that LibreOffice can find it. My concern is that perhaps HSQLDB v2.7.4 requires a higher level of Java than she has installed.

Summary

  • That should be the built-in driver for embedded HSQL, version 1.8 of 2006 unless you replaced it. If you replaced that driver with a version higher than 2.4.1, LibreOffice won’t be able to deal with embedded HSQL because any version higher than 2.4.1 can’t open databases of version 1.x.
  • file:///G:/Shared%20drives/Lead%20Drivers/ExternalDB/driver/hsqldb.jar should be moved to a local drive. Think of it as an executable. It’s a Java program. Read-only access would be fine.
  • The HSQL version of the database, according to its properties file, should be lower than or equal to the driver version, according to META-INF/MANIFEST.MF (but no database 1.x with driver 2.5 or higher).
  • HSQL 2.x drivers should not be registered at Tools>Options>Advanced>Class Path… because that spoils embedded HSQL databases. They will open fine, silently converted to HSQL2.4, but they won’t open a second time until you extract them.

Because you must not add HSQL to LibreOffice’s class path, my macro suite offers the option to register the driver at the database document. There is no such option in the LibreOffice user interface, but the programming interface allows doing so. This way you keep HSQL 2.x out of the global configuration and specify the driver for each document separately.

And where is located the MOW DB itself?
How are the strings for these 2 fields?
ConnectHSQLDB

hsqldb:file:/path/database_name;default_schema=true;shutdown=true;hsqldb.default_table_type=cached;get_column_name=false
where “database_name” is the prefix of the respective database files
database_name.script
database_name.properties
database_name.data
database_name.backup

I’m not sure if it is a good idea to read the database files from a network drive.

So, 1st text box gets:
jdbc:hsqldb:file:/path/MOW;default_schema=true;shutdown=true;hsqldb.default_table_type=cached;get_column_name=false
 
And 2nd (driver class)…
 

But it’s working for him.

Wow, a lot of questions in there. Let me do my best.

  • Yeah, I get it on what a jar file is. I copied it to my LibreOffice path and to hers. It works for me in either location (pointed to with @Villeroy’s macro). It works for her in neither location.
  • No embedded database anywhere here anymore; only external v2.7.4.
  • I did not set up the Google drive and this usage; I inherited it. It worked fine until the internal->external conversion and the HSQLDB version upgrade.
  • Not sure exactly what you are asking about text boxes. Is this it?
    image
    image

The full string above is hsqldb:file:G:\Shared drives\Lead Drivers\ExternalDB\database\MOW;default_schema=true;shutdown=true;hsqldb.default_table_type=cached;get_column_name=false

Thanks for your patience. Did I miss any questions?
Charles

These are the 2 text boxes that appears in (the 2nd window)
Base > Connect to existing DB > JDBC
[Test class]
Just asking… as it’s not working for her.

Does anyone know the answer to my question:

What version or level of Java does HSQLDB v2.7.4 require? (Or, where could I look to determine what level it requires?)

This is obviously “something stupid.” All the things that should cause this problem have been crossed off the list. Something that is different between her PC and mine. (Both are Windows 11 and both have the same path setup and Jar file.) It’s something none of us are thinking of. Java version struck me this morning as a candidate.

Thanks,
Charles

I don’t know. I never encountered any problem with Java and Open/LibreOffice. On Windows boxes I installed something “conservative” like 1.8. On Linux I use whatever comes preinstalled.

 $ java -version
openjdk version "21.0.10" 2026-01-20
OpenJDK Runtime Environment (build 21.0.10+7-Debian-1deb13u1)
OpenJDK 64-Bit Server VM (build 21.0.10+7-Debian-1deb13u1, mixed mode, sharing)

A common problem on Windows is the bitness. Any Java in C:\program files (x86)\ will not interface with any application stored in C:\program files\ and vice versa.
OpenOffice for Windows is a 32-bit program working with a 32-bit Java runtime. Both need to be stored on the x86 path. A recent version of LibreOffice for Windows is a 64-bit program stored in the normal program folder.

I never knew that. (I am not really a Windows guy.*) I never knew the difference between program files and program files (x86). I just thought it was one of those MS things. I will look into that.

*FWIW, “my” platform is IBM Z Mainframe Servers and Software .

Charles