Description: We will soon have with version 24.02 of LibreOffice the possibility to create as many databases in embedded mode as there are drivers available (provided by LibreOffice or in the form of an extension). See bug 156471 LibreOffice provides the embedded firebird and hsqldb 1.8 drivers and uses the following two urls for this: - sdbc:embedded:firebird - sdbc:embedded:hsqldb I have two extensions SQLiteOOo and HsqlDriverOOo which will be in a next version able to work on a unique / private url and other than sdbc:embedded:hsqldb What would be the rules, if any, that these new urls should follow? Actual Results: Expected Results: Reproducible: Always User Profile Reset: No Additional Info:
We could consider the following two urls, as reserved for the drivers integrated into LibreOffice: - sdbc:embedded:hsqldb - sdbc:embedded:firebird And the following two urls reserved for the use of HyperSQLOOo[1] and SQLiteOOo[2] extensions, respectively: - sdbc:embedded:hsqldb2 - sdbc:embedded:sqlite This will allow to differentiate an odb file using the native driver of LibreOffice from an odb file using the driver of the HyperSQLOOo extension. But we must keep in mind that at any given time one and only one version of the hsqldb.jar driver (for example) can be loaded. Two scenarios can happen: - the hsqldb.jar driver is in the class path of java. - the hsqldb.jar driver is loaded by a url class loader. In the first case (such as if we add the jar archive file in Tools -> Options -> LibreOffice -> Advanced -> Class Path... -> Add Archive... or if you are on Linux with LibreOffice Community and you have installed both packages: libreoffice-sdbc-hsqldb and libhsqldb1.8.0-java) we will be limited to the use of the version of this jar archive. In the second case (such as using the jdbcDriverOOo, HyperSQLOOo and SQLiteOOo extensions) only the version of the first loaded driver will be available. So even if we differentiate the LibreOffice driver by different urls, it will not protect us from version conflicts between Java drivers (hsqldb embedded 1.8 vs HyperSQLOOo 2.7.2) [1] https://prrvchr.github.io/HyperSQLOOo/ [2] https://prrvchr.github.io/SQLiteOOo/
@prrvchr: you might want to try to contact Stephan Bergmann about how the loading of the jars might be addressed across the various OSes that the project supports.
Confirming, this problem has been around since the release of OOo first supporting embedded hsqldb, and became more acute as hsqldb has evolved in version of the years.
@Alex Thurgood: We will not be able to overcome the limitations specific to Java concerning conflicts between different versions of jar archives. On the other hand, we can ensure that under Linux the installation of the packages: libreoffice-sdbc-hsqldb and libhsqldb1.8.0-java necessary for the use of embedded HsqlDB loads the jar archive via a URL ClassLoader rather than modifying the Java ClassPath as it seems to do... I think that improving this specific point requires opening a specific issue... When I finish my current work, I can take care of it...
(In reply to Alex Thurgood from comment #2) > @prrvchr: you might want to try to contact Stephan Bergmann about how the > loading of the jars might be addressed across the various OSes that the > project supports. (Just a quick note that I haven't looked into LO's database driver jar loading code in ages.)