Jaybird 6.0.2 embedded

32 views
Skip to first unread message

Pierre Vacher

unread,
Jul 16, 2025, 1:33:06 PMJul 16
to firebird-java
Hi all,

I'm using Jaybird 6.0.2 in embedded mode and under Ubuntu 22.04.

Recently I uninstalled the package: firebird3.0-server-core with my package manager.

After this uninstallation I can no longer connect in embedded mode without reinstalling this package.

Is this normal? And if so:
  • Isn't there another way to get these missing files?
  • Does this problem also occur on Windows?

Pierre Vacher

unread,
Jul 16, 2025, 1:42:51 PMJul 16
to firebird-java
If the firebird3.0-server-core package is missing the error is:

Native library (linux-x86-64/libfbembed.so) not found in resource path ([jar:file:///home/prrvchr/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu8928iv6z.tmp_/JaybirdOOo.oxt/driver/jaybird-native-6.0.0-20240512.161600-21.jar!/, jar:file:///home/prrvchr/.config/libreoffice/4/user/uno_packages/cache/uno_packages/lu8928iv6z.tmp_/JaybirdOOo.oxt/driver/jaybird-6.0.0-20240512.161600-27.jar!/])
        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:325)
        at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:481)
        at com.sun.jna.Library$Handler.<init>(Library.java:197)
        at com.sun.jna.Native.load(Native.java:618)
        at com.sun.jna.Native.load(Native.java:592)
        at org.firebirdsql.gds.ng.jna.FbEmbeddedDatabaseFactory.createClientLibrary(FbEmbeddedDatabaseFactory.java:85)

Mark Rotteveel

unread,
Jul 16, 2025, 2:16:15 PMJul 16
to firebi...@googlegroups.com
On 16/07/2025 19:33, Pierre Vacher wrote:
> I'm using Jaybird 6.0.2 in embedded mode and under Ubuntu 22.04.
>
> Recently I uninstalled the package: *firebird3.0-server-core* with my
> package manager.
>
> After this uninstallation I can no longer connect in embedded mode
> without reinstalling this package.
>
> Is this normal? And if so:

Unless you have the Firebird server engine available elsewhere, this is
entirely expected. The firebird3.0-server-core is what provides the
database engine.

> * Isn't there another way to get these missing files?

Yes, you can use a binary package from the Firebird website, or compile
from source.

> * Does this problem also occur on Windows?
Yes, it occurs there as well. Jaybird is just a Java library; it doesn't
provide the database engine on its one. When using it in embedded
connection, it requires the Firebird database engine, and for the
database engine it needs to load libfbclient.so and related files like
plugins/libengineNN.so, which is the actual database engine. And on your
system, that is provided by firebird3.0-server-core.

For Windows I did create an experimental package that allows Jaybird to
load Firebird from the classpath (or more correctly, find it on the
classpath, unzip it to a temporary location, and then load the library).
That was to validate the functionality of the Firebird Embedded locator
service provider in Jaybird. I never tried for Linux. And as I have no
need for embedded myself, it is no priority for me.

You could try and build one yourself. You can find details in:

-
https://firebirdsql.org/docs/drivers/java/5.0.x/release_notes.html#embedded-locator-service-provider
-
https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2020-05-firebird-embedded-locator-service-provider.md

You can find the experimental package for Windows at
https://github.com/mrotteveel/jaybird-embedded-win32-x86-64, I hope -
but don't know for sure - that for Linux it should work along similar lines.
--
Mark Rotteveel

Mark Rotteveel

unread,
Jul 16, 2025, 2:19:43 PMJul 16
to firebi...@googlegroups.com
On 16/07/2025 19:42, Pierre Vacher wrote:
> If the *firebird3.0-server-core* package is missing the error is:
>
> Native library (linux-x86-64/libfbembed.so) not found in resource path
> ([jar:file:///home/prrvchr/.config/libreoffice/4/user/uno_packages/
> cache/uno_packages/lu8928iv6z.tmp_/JaybirdOOo.oxt/driver/jaybird-
> native-6.0.0-20240512.161600-21.jar!/, jar:file:///home/prrvchr/.config/
> libreoffice/4/user/uno_packages/cache/uno_packages/lu8928iv6z.tmp_/
> JaybirdOOo.oxt/driver/jaybird-6.0.0-20240512.161600-27.jar!/])
>         at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:325)
>         at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:481)
>         at com.sun.jna.Library$Handler.<init>(Library.java:197)
>         at com.sun.jna.Native.load(Native.java:618)
>         at com.sun.jna.Native.load(Native.java:592)
>         at
> org.firebirdsql.gds.ng.jna.FbEmbeddedDatabaseFactory.createClientLibrary(FbEmbeddedDatabaseFactory.java:85)
Note that that error is slightly misleading: it tries libfbembed.so (the
embedded engine library name in Firebird 2.5 and older) and
libfbclient.so (the client library which can load the the embedded
database engine of Firebird 3.0 and higher). However, the error simply
reports only libfbembed.so. I guess I need to change that now Firebird
2.5 and older are no longer supported.

Mark
--
Mark Rotteveel

Pierre Vacher

unread,
Jul 16, 2025, 2:45:47 PMJul 16
to firebird-java
Hi Mark,

Ok I didn't think the database server needed to be installed.
It was only after uninstalling that I noticed this.

So I guess that under Windows 64 it is necessary to install the file:

> For Windows I did create an experimental package that allows Jaybird to
> load Firebird from the classpath (or more correctly, find it on the
> classpath, unzip it to a temporary location, and then load the library).
> That was to validate the functionality of the Firebird Embedded locator
> service provider in Jaybird. I never tried for Linux. And as I have no
> need for embedded myself, it is no priority for me. 

Very interesting, I'll see if it's possible to integrate this into the next version of JaybirdOOo.
It would be really good if there was only the extension to install to use it...


Thank you again for your quick and accurate responses.

Pierre.

Mark Rotteveel

unread,
Jul 16, 2025, 2:57:38 PMJul 16
to firebi...@googlegroups.com
On 16/07/2025 20:45, Pierre Vacher wrote:
> Ok I didn't think the database server needed to be installed.
> It was only after uninstalling that I noticed this.

Well, theoretically, the server doesn't need to be "installed", but its
files need to be available and libfbclient.so needs to be on the
LD_LIBRARY_PATH, and libfbclient.so must be able to load its supporting
files, including plugins/libengineNN.so.

> So I guess that under Windows 64 it is necessary to install the file:
> https://github.com/FirebirdSQL/firebird/releases/download/v5.0.3/
> Firebird-5.0.3.1683-0-windows-x64.exe

Yes, or you can use the zipkit on Windows, as long as you inform Jaybird
of the location of its fbclient.dll, using PATH (LD_LIBRARY_PATH on
Linux), or the jna.library.path Java system property, or the
nativeLibraryPath connection property (NOTE: only has effect for the
connection that is the first to load the native library).

As I usually work on Windows, I don't know all intricacies of running on
Linux; I know that loading Firebird can be a bit more complicated
compared to Windows, but maybe that is my lack of familiarity.

[..]

> Thank you again for your quick and accurate responses.
You're welcome :)

Mark
--
Mark Rotteveel

Pierre Vacher

unread,
Jul 17, 2025, 9:30:11 PMJul 17
to firebird-java
I'm looking at the provider example for Windows.

I suppose for Linux I can consider the same list of files with .so instead of .dll?

And that I will find all these files in the Firebird Server file archive for Linux?

Mark Rotteveel

unread,
Jul 18, 2025, 3:03:25 AMJul 18
to firebi...@googlegroups.com
On 18/07/2025 03:30, Pierre Vacher wrote:
> I'm looking at the provider example for Windows <https://github.com/
> FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2020-05-firebird-
> embedded-locator-service-provider.md#example-provider>.
>
> I suppose for Linux I can consider the same list of files with .so
> instead of .dll?
>
> And that I will find all these files in the Firebird Server file archive
> for Linux?
Yes. However, there might be complications with things like ICU, and
possibly other libraries that are assumed to be provided by the system,
and I believe that the default builds of Firebird on Linux look up
things based on paths that are determined/configured at build time, so
I'm not sure it will work as easy and simple on Linux as it does on Windows.

Mark
--
Mark Rotteveel

Pierre Vacher

unread,
Jul 21, 2025, 6:07:11 PMJul 21
to firebird-java
Well, it works perfectly under Windows, but I haven't yet succeeded under Linux.

The archive has been modified to be able to provide the Linux and Windows platforms. See JaybirdEmbedded.

But I must be missing some files in the Linux archive.

Pierre Vacher

unread,
Jul 21, 2025, 8:11:53 PMJul 21
to firebird-java
This also works on Linux.

You just need to install the libtomcrypt package with your package manager.

Thanks again, this will make Jaybird Embedded truly embedded.

Mark Rotteveel

unread,
Jul 22, 2025, 2:41:02 AMJul 22
to firebi...@googlegroups.com
On 22/07/2025 02:11, Pierre Vacher wrote:
> This also works on Linux.
>
> You just need to install the *libtomcrypt* package with your package
> manager.
>
> Thanks again, this will make Jaybird Embedded truly embedded.
Thanks. Did you use the unmodified binaries from the Firebird site? Or
build your own?

BTW, I'm not 100% sure, but it might be possible to build Firebird so it
includes libtomcrypt on its own instead of relying on the
system-provided library.

Mark
--
Mark Rotteveel

Pierre Vacher

unread,
Jul 22, 2025, 3:18:46 AMJul 22
to firebird-java
> BTW, I'm not 100% sure, but it might be possible to build Firebird so it 
> includes libtomcrypt on its own instead of relying on the
> system-provided library

Yes, I didn't bother compiling and using the downloadable binaries.

I'll try compiling to see if I can do without the necessary package.

And thanks again for your good work...

Pierre Vacher

unread,
Jul 22, 2025, 9:04:41 AMJul 22
to firebird-java
If I compile with the following options:

./autogen.sh --with-builtin-tommath --with-builtin-tomcrypt

I manage to get the libtommath and libtomcrypt libraries included, but I end up with a 180MB libEngine13.so file, whereas it's only 8MB in the Linux binary distribution.

I'm probably missing the right compilation option?

Mark Rotteveel

unread,
Jul 22, 2025, 10:55:01 AMJul 22
to firebi...@googlegroups.com
On 22/07/2025 15:04, Pierre Vacher wrote:
> If I compile with the following options:
>
> *./autogen.sh --with-builtin-tommath --with-builtin-tomcrypt*
>
> I manage to get the *libtommath* and *libtomcrypt* libraries included,
> but I end up with a 180MB *libEngine13.so* file, whereas it's only 8MB
> in the Linux binary distribution.
>
> I'm probably missing the right compilation option?
Maybe. I'd suggest asking on firebird-devel about it, maybe the core
developers have an idea.

Mark
--
Mark Rotteveel
Reply all
Reply to author
Forward
0 new messages