Documentation
Ce document en français.
The use of this software subjects you to our Terms Of Use.
Introduction:
DerbyOOo is part of a Suite of LibreOffice and/or OpenOffice extensions allowing to offer you innovative services in these office suites.
This extension allows you to use Apache Derby database in embedded mode, making the database portable (a single odb file).
It allows you to take advantage of the ACID properties of the underlying Apache Derby database.
Being free software I encourage you:
In short, to participate in the development of this extension.
Because it is together that we can make Free Software smarter.
Requirement:
The DerbyOOo extension uses the jdbcDriverOOo extension to work.
It must therefore meet the requirement of the jdbcDriverOOo extension.
Additionally, due to issue #156471 and following PR#154989, the DerbyOOo extension requires LibreOffice version 24.2.x minimum to work.
Installation:
It seems important that the file was not renamed when it was downloaded.
If necessary, rename it before installing it.
Restart LibreOffice after installation.
Be careful, restarting LibreOffice may not be enough.
-
On Windows to ensure that LibreOffice restarts correctly, use Windows Task Manager to verify that no LibreOffice services are visible after LibreOffice shuts down (and kill it if so).
-
Under Linux or macOS you can also ensure that LibreOffice restarts correctly, by launching it from a terminal with the command
soffice and using the key combination Ctrl + C if after stopping LibreOffice, the terminal is not active (no command prompt).
After restarting LibreOffice, you can ensure that the extension and its driver are correctly installed by checking that the io.github.prrvchr.DerbyOOo.Driver driver is listed in the Connection Pool, accessible via the menu: Tools -> Options -> LibreOffice Base -> Connections. It is not necessary to enable the connection pool.
If the driver is not listed, the reason for the driver failure can be found in the extension’s logging. This log is accessible via the menu: Tools -> Options -> LibreOffice Base -> Embedded Derby Driver -> Logging Options.
The DerbyLogger logging must first be enabled and then LibreOffice restarted to get the error message in the log.
Remember to first update the version of the Java JRE or JDK installed on your computer, this extension need the new version of jdbcDriverOOo that requires Java version 17 or later instead of Java 11 previously.
Use:
How to create a new database:
In LibreOffice / OpenOffice go to File -> New -> Database…:

In step: Select database:
- select: Create a new database
- in: Emdedded database: choose: Embedded SQLite Driver
- click on button: Next

In step: Save and proceed:
- adjust the parameters according to your needs…
- click on button: Finish

Have fun…
How does it work:
DerbyOOo is an com.sun.star.sdbc.Driver UNO service written in Python.
It is an overlay to the jdbcDriverOOo extension allowing to store the Derby database in an odb file (which is, in fact, a compressed file).
Its operation is quite basic, namely:
- When requesting a connection, several things are done:
- When closing or renaming (Save As) the odb file, if the connection was successful, the DocumentHandler copies all files present in the subdirectory into the (new) database directory of the odb file (zip), then delete the subdirectory.
The main purpose of this mode of operation is to take advantage of the ACID characteristics of the underlying database in the event of an abnormal closure of LibreOffice.
On the other hand, the function: file -> Save has no effect on the underlying database. Only closing the odb file or saving it under a different name (File -> Save As) will save the database in the odb file.
How to build the extension:
Normally, the extension is created with Eclipse for Java and LOEclipse. To work around Eclipse, I modified LOEclipse to allow the extension to be created with Apache Ant.
To create the DerbyOOo extension with the help of Apache Ant, you need to:
- Install the Java SDK version 8 or higher.
- Install Apache Ant version 1.10.0 or higher.
- Install LibreOffice and its SDK version 7.x or higher.
- Clone the DerbyOOo repository on GitHub into a folder.
- From this folder, move to the directory:
source/DerbyOOo/
- In this directory, edit the file:
build.properties so that the office.install.dir and sdk.dir properties point to the folders where LibreOffice and its SDK were installed, respectively.
- Start the archive creation process using the command:
ant
- You will find the generated archive in the subfolder:
dist/
Has been tested with:
-
LibreOffice 24.2.1.2 (x86_64)- Windows 10
-
LibreOffice 24.2.1.2 - Lubuntu 22.04
-
LibreOffice 24.8.0.3 (x86_64) - Windows 10(x64) - Python version 3.9.19 (under Lubuntu 22.04 / VirtualBox 6.1.38)
I encourage you in case of problem 
to create an issue
I will try to solve it 
Historical:
What has been done for version 1.0.0:
- Implementation of a new format in odb files allowing the name of the catalog of the underlying database to be taken into account.
What has been done for version 1.1.0:
- This version is based on fix #154989 available since LibreOffice 24.2.x. It can therefore work with other extensions offering integrated database services.
- Now DerbyOOo requires LibreOffice 24.2.x minimum and will load for the url:
sdbc:embedded:derby.
What has been done for version 1.1.1:
- Updated the Python packaging package to version 24.1.
- Updated the Python setuptools package to version 72.1.0.
- The extension will ask you to install the jdbcDriverOOo extension in versions 1.4.2 minimum.
What has been done for version 1.1.2:
- Fixed issue #2 which appears to be a regression related to the release of JaybirdOOo. Thanks to TeddyBoomer for reporting it.
- Updated the Python setuptools package to version 73.0.1.
- Logging accessible in extension options now displays correctly on Windows.
- Derby is now properly shutdown before files are recompressed into the odb file (ie: the db.lck file is no longer present in the odb file).
- The extension options are now accessible via: Tools -> Options… -> LibreOffice Base -> Embedded Derby Driver
- Changes to extension options that require a restart of LibreOffice will result in a message being displayed.
- Support for LibreOffice version 24.8.x.
What has been done for version 1.1.3:
- Requires the latest version of jdbcDriverOOo 1.4.4.
- In the extension options it is possible to define the options: View system tables, Use bookmarks and Force SQL mode which will be specific to this driver.
What has been done for version 1.1.4:
- The extension will ask you to install jdbcDriverOOo extension in versions 1.4.6 minimum.
- Modification of the extension options accessible via: Tools -> Options… -> LibreOffice Base -> Embedded Derby Driver in order to comply with the new graphic charter.
What has been done for version 1.2.0:
- Passive registration deployment that allows for much faster installation of extensions and differentiation of registered UNO services from those provided by a Java or Python implementation. This passive registration is provided by the LOEclipse extension via PR#152 and PR#157.
- Modified LOEclipse to support the new
rdb file format produced by the unoidl-write compilation utility. idl files have been updated to support both available compilation tools: idlc and unoidl-write.
- It is now possible to build the oxt file of the DerbyOOo extension only with the help of Apache Ant and a copy of the GitHub repository. The How to build the extension section has been added to the documentation.
- Any errors occurring while loading the driver will be logged in the extension’s log if logging has been previously enabled. This makes it easier to identify installation problems on Windows.
- Requires the jdbcDriverOOo extension at least version 1.5.0.
What has been done for version 1.2.1:
- Many fixes that prevented proper functioning have been made to the driver written in Python and wrapping the driver that jdbcDriverOOo provides.
- Requires the jdbcDriverOOo extension at least version 1.5.1.
What has been done for version 1.2.2:
- Requires the jdbcDriverOOo extension at least version 1.5.4.
What has been done for version 1.2.3:
- Requires the jdbcDriverOOo extension at least version 1.5.7.
What has been done for version 1.3.0:
- If the jdbcDriverOOo extension works without Java instrumentation, a warning message will be displayed in the extension options.
- Requires the jdbcDriverOOo extension at least version 1.6.1.
- Has been tested under LibreOfficeDev 26.2.
What remains to be done for version 1.3.0: