"Connection could not be established" when creating a JDBC connection from LibreOffice Base 26.2 to FirebirdSQL 5.

When trying to connect LibreOffice Base 26.2 to a FirebirdSQL 5 .fdb file I’m getting a “Connection could not be established” message.

I’m as certain as I can be that the username and password being entered (usrbatch/usrbatch) are correct.

The JDBC connection string and driver were tested successfully. The error message appears after the Firebird username and password have been keyed.

You can find information about how the database was created below.

Apologies for the length of the post as I have anticipated that the more, specific, information people have the easier it will be to spot the source of the error.

In C:\Program Files\Firebird\Firebird_5_0\database.conf there is the line.
testa = C:/Users/salis/Documents/DBs/TestDB/testa.fdb

To create the data FirebirdSQL commands were entered using the isql tool. These were:
CONNECT employee user ‘SYSDBA’ password ‘masterkey’;

CREATE USER usrbatch PASSWORD 'usrbatch' FIRSTNAME 'Run' LASTNAME 'Batch' GRANT ADMIN ROLE ACTIVE TAGS (Interactive = 'No', LibreOffice = 'No', isql = 'Yes');

create database 'C:/Users/salis/Documents/DBs/TestDB/testa.fdb' USER usrbatch PASSWORD 'usrbatch' ROLE RDB$ADMIN PAGE_SIZE 8192 SET NAMES 'NONE' DEFAULT CHARACTER SET NONE;

show database;
	Database: testa
    		Owner: USRBATCH
	PAGE_SIZE 8192
	Number of DB pages allocated = 240
	Number of DB pages used = 224
	Number of DB pages free = 16
	Sweep interval = 20000
	Forced Writes are ON
	Transaction - oldest = 14
	Transaction - oldest active = 15
	Transaction - oldest snapshot = 15
	Transaction - Next = 18
	ODS = 13.1
	Database not encrypted
	Embedded connection
	Creation date: Mar 10, 2026 16:48:29
	Replica mode: NONE
	Default Character set: NONE
	Publication: Disabled

CREATE TABLE "ZZ_contact" ("ZZ_contact_id" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0 INCREMENT BY 1) PRIMARY KEY,  "contact_name" VARCHAR(50) DEFAULT 'Contact Name',  "contact_email" VARCHAR(50),  "contact_role" VARCHAR(50));
INSERT INTO "ZZ_contact" ("contact_name", "contact_email", "contact_role") values ('First Last','x@xgov.uk','IT support');
SELECT * from "ZZ_contact";
    displays the row just inserted.

Environment
A single Windows PC with a single Windows user account
Windows 10 22H2
FirebirdSQL 5.0
LibreOffice
Version: 26.2.0.3 (X86_64)
Build ID: 620(Build:3)
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: CL threaded
In LO the Java Runtime Environment used is
openjdk version “25.0.2” 2026-01-20 LTS
OpenJDK Runtime Environment Temurin-25.0.2+10 (build 25.0.2+10-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.2+10 (build 25.0.2+10-LTS, mixed mode, sharing)
In LO the Class Path Archive (Using Tools → Options → LibreOffice → Advanced → Class Path → Add Archive…) is
C:\Program Files\Jaybird\jaybird-6.0.4\jaybird-6.0.4.jar

Connection string jdbc:firebirdsql://localhost:3050/testa
JDBC Driver Class org.firebirdsql.jdbc.FBDriver.

Options?
1, LO requires a specific plugin or connection provider
Looking at Section 14.1 “User Authentication” in the Language Reference (https://www.firebirdsql.org/file/documentation/html/en/refdocs/fblangref50/firebird-50-language-reference.html) I can see “User authentication can be performed in several ways, depending on the setting of the AuthServer parameter in the firebird.conf configuration file. This parameter contains the list of authentication plugins that can be used when connecting to the server. If the first plugin fails when authenticating, then the client can proceed with the next plugin, etc. When no plugin could authenticate the user, the user receives an error message.”

There is no “AuthServer” reference in C:\Program Files\Firebird\Firebird_5_0\database.conf.

There is also some information about AuthServers and AuthClients in the Configuration Reference (https://www.firebirdsql.org/docs/html/en/refdocs/fbconf/firebird-configuration-reference.html) Does LO required a specific plugin? Or Connection provider?

2, The database is reported as “Embedded connection”.
Again from Section 14.1 “The embedded version of the server does not use authentication; for embedded, the filesystem permissions to open the database file are used as authorization to access the database. However, the username, and — if necessary — the role, must be specified in the connection parameters, as they control access to database objects.”

3, Something else.

Thank you for any help that can be provided.

“Embedded” is certainly wrong.

  • menu:Tools>Options>Advanced… button [Class Path…], add your JDBC driver and restart the office.
  • menu:File>New>Database…
  • Connect to existing database of type “JDBC”.
  • Enter a JDBC-URL and driver class according to the documentation of your JDBC driver.

Villeroy,

As soon as I posted the question I realised that I had forgotten the JDBC connection string and driver.

They are
Connection string jdbc:firebirdsql://localhost:3050/testa
JDBC Driver Class org.firebirdsql.jdbc.FBDriver.

I should also add that in C:\Program Files\Firebird\Firebird_5_0\database.conf there is the line.
testa = C:/Users/salis/Documents/DBs/TestDB/testa.fdb

I think that I’m already doing what you are suggesting. Am I missing something?

To try and keep relevant information together I’ve updated the initial question.

I don’t know. I only create some test documents with the built-in FB3 driver.

Some hints from German Base Handbuch:
Last JDBC version, which would connect LibreOffice/OpenOffice the right way without internal driver, is Jaybird 5.
Connection string is something like jdbc:firebirdsql:oo://host[:port]/<path_or_alias>
Driver is org.firebirdsql.jdbc.FBDriver
When setting up a connection for Base Handbuch this was the connection string I used:
jdbc:firebirdsql:oo://localhost/libretest.fdb?charSet=UTF-8
oo is the special string for connection with OpenOffice/LibreOffice. Without this might be content of tables won’t be shown.

RobertG,

Thanks. I’m out and about for the rest of the day. When I get a chance I’ll have a look at your comments on more detail.

Thanks again.

Just asking :thinking: is this driver the right one for FB 5?

Looking at the to responses I’m wondering if the software to link LO to FB5 is fully established.

After using HyperSQL, both embedded and split, I’m only using Firebird because I had understood that LO were loosening its ties to HyperSql and preferring Firebird.

In my ignirance I picked the latest version of Firebird and of the Jaybird driver. It could be that these may not work with LO.

The two lines of enquiry might be
1, Ask the Firebird team how to create a database without an embedded connection
2, Try different version of the Jaybird jar.

In the meantime it looks as though the best connection between LO and FB is with FB3.

Thsnk you for your thoughts.

HSQL is actively developed software. IMHO, split HSQL is the way to go. It simply works with LibreOffice, either in file mode or in server mode.

Thanks Andreas,

For now I’m going to explore RobertG’s oprions and, if they don’t work, then, as you say, there is always the option for a “split” HyperSQL database.

Regards

Nick

HSQLDB is an excellent DB of course.
But MariaDB also works well.
After you set up the connection – see e.g.

Connect to MariaDB

– it works fine.
And of course you do have the straightforward command line interface + the GUI tools.

Thank you to everyone for your contributions.

I have now tried all the combinations below and they all fail to set up a connection.

For now, at least, I’m giving up on Firebird 5.

I may explore postgres or MariaSQL.

Regards

Appendix 1 Tests
With Jaybird 6
jdbc:firebirdsql:oo://localhost:3050/testa
jdbc:firebirdsql:oo://localhost/testa

Connection string jdbc:firebirdsql:oo://localhost:3050/testa
JDBC Driver Class org.firebirdsql.jdbc.FBDriver

Connection string jdbc:firebirdsql:oo://localhost:3050/testa?charSet=UTF-8
JDBC Driver Class org.firebirdsql.jdbc.FBDriver

Jaybird 5
File at C:\Program Files\Jaybird\jaybird-5.0.11.java11\jaybird-5.0.11.java11.jar
Connection string jdbc:firebirdsql:oo://localhost:3050/testa
JDBC Driver Class org.firebirdsql.jdbc.FBDriver

Connection string jdbc:firebirdsql://localhost:3050/testa
JDBC Driver Class org.firebirdsql.jdbc.FBDriver

Connection string jdbc:firebirdsql:oo://localhost:3050/testa?charSet=UTF-8
JDBC Driver Class org.firebirdsql.jdbc.FBDriver

Connection string jdbc:firebirdsql://localhost:3050/testa?charSet=UTF-8
JDBC Driver Class org.firebirdsql.jdbc.FBDriver

I wouldn’t use Firebird for server. MariaDB and PostgreSQL are supported by direct driver from LO.
But: Is “testa” the whole name of the database file? Not “testa.fdb”?

RobertG

Thanks.

I had understood that LibreOffice was moving away from HyperSQL to Firebird, which is why I started using Firebird.

If Firebird is the wrong answer then I’ll look elsewhere, probably postures.

“testa” is an alias set up in the Firebird database.conf file.

Regards

I suspect that the fundamental issue is that LibreOffice embeds its own Firebird engine and that, while this works fine for FB3, it has yet to be upgraded for FB 4 or 5.
If anyone thinks that this is wrong then I’m happy to be corrected.
If anyone can give me the conditions that lead to the “The connection could not be established” message (other than incorrect username or password) then I’m happy to keep exploring this, perhaps asking the Firebird team.
If the relevant people haven’t got the time or the inclination then I entirely understand and will continue to explore other options.
For now I suggest that this topic is closed.

The built-in driver does not connect via JDBC because the intention of integrating Firebird was to get rid of Java dependency.

Andreas,
Thanks. So to use LO Base with FB 5 (or 4) I would need the relevant drivers to be developed. Given people’s other priorities and preferences I would guess that this might take some time, if at all.

I’ll pursue other options.

Regards

I don’t know if any JDBC driver for Firebird 5 exists. You have to register any JDBC driver to be used with LibreOffice in Tools>Options>Advanced>Class Path edit: OR registered in the database document itself.
Having a database of version 5 and a driver of version 5 (or higher), a JDBC connection should work out of the box.
Having a database of version 3, you can simply create a new Base file and connect to an existing database “Firebird External”.

They list Jaybird 6 themself, and I guess version 5 of Jaybird works also (as Robert mentions it above). Main difference seems to be the required version of java…
https://www.firebirdsql.org/en/jdbc-driver/

No, drivers exist. And the whole idea behind ODBC/JDBC is not having every software to provide drivers for every database. For Windows I have only used ODBC, so not much experience on JDBC.

That was completely wrong, as you can connect via odbc/jdbc to datebases, where no direct connections exist. Every connection is separate.

@Wanderer

Thank you for your comments

1, “They list Jaybird 6 themself, and I guess version 5 of Jaybird works also (as Robert mentions it above). Main difference seems to be the required version of java… “

I’ve tried both Jaybird 6 and 5. For both sets of tests the Java version was “25.0.2” 2026-01-20 LTS. You can see the various tests in my response to Robert - post #12 Mar 11, 4:39 PM

2, “That was completely wrong, as you can connect via odbc/jdbc to datebases, where no direct connections exist. Every connection is separate. “.

That was my thinking too, which is why I went down the JDBC route. The trouble is that with the variables that I have (see below) and even with the help offered in this topic I cannot get the connection set up.

Variable - the two items I’m changing are

java drive – jaybird 5 or 6

jdbc connection string

Everything else is constant, for example

The JDBC Driver Class is “org.firebirdsql.jdbc.FBDriver”

Username and password.

3, “For Windows I have only used ODBC”. I’ve now tried that and, once I had sorted out an errant fbclient.dll file, this is working.

Given the success with the ODBC route on Windows I now plan to drop the JDBC approach.

Thank you to everyone who contributed to this topic.

1 Like