Bug 132195 - Better integration of hsqldb 2.5.0
Summary: Better integration of hsqldb 2.5.0
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: contrib (show other bugs)
Version:
(earliest affected)
6.4.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-HSQLDB
  Show dependency treegraph
 
Reported: 2020-04-17 15:03 UTC by prrvchr
Modified: 2021-01-11 21:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description prrvchr 2020-04-17 15:03:59 UTC
I am using hsqldb 2.5.0 in the gContactOOo extension which is just a wrapper around this driver. Version 2.5.0 includes system versioning, which can facilitate write replication (only reading is implemented now)

I would like to be able to better integrate hsqldb in Base, like:
User Management, management of tables, views ... in short all the high level components sdbcx...

But I am faced with problems that exceed my skills, and realize that it will be difficult to progress if I do not find help ...

One of my first problem is having an error: "java.lang.IncompatibleClassChangeError" when executing executeQuery() on a PreparedStatement
The workaround for this problem is to replace executeQuery() with execute() and return the result by getResultSet()

But in fact I realize that I have this error on many other method of a PreparedStatement (setBoolean(), setString()...) and having not found a workaround I am stuck...

Thanks for any help.
Comment 1 Julien Nabet 2020-04-17 15:39:19 UTC
LO includes HSQLDB 1.8.

Some people wanted to upgrade HSQLDB others wanted to get rid of Java so replacing HSQLDB (which is Java dependent) by Firebird.
Today, we're in the middle of the bridge. Firebird has been integrated but some features have not been implemented in LO and there are bugs waiting on bugtrackers.
There are few commits about Base because there are very few devs.
The only person I know who may help is Lionel Elie Mamane but he's on other things and don't think he'll invest some time on it. However, you can try to ping him.
Finally you must take into account that existing odbs with 1.8 version should continue to work even after the migration to new version of HSQLDB.

Let's put this one to ENHANCEMENT meanwhile but I'd hesitate to put this one as a dup of tdf#34411
Comment 2 prrvchr 2020-04-17 16:05:20 UTC
> you can try to ping him.
what do you mean by, how I do?

> Finally you must take into account that existing odbs with 1.8 version should continue

The easiest way is to offer the 1.8.x driver as an extension...
Comment 3 Robert Großkopf 2020-04-17 16:39:36 UTC
Don't know if this one has anything to do with bug 34411. Bug 34411 is about using internal and external databases in different HSQLDB-versions.

If I understand the description the right way there are problems while connecting from Base to external HSQLDB. 

But I don't know what a driver for a GoogleContact integration has to do with a connection from HSQLDB 2.5.0. Isn't there a original JDBC-driver available for HSQLDB 2.5.0?
Comment 4 Julien Nabet 2020-04-17 16:50:32 UTC
(In reply to prrvchr from comment #2)
> > you can try to ping him.
> what do you mean by, how I do?
> 
> > Finally you must take into account that existing odbs with 1.8 version should continue
> 
> The easiest way is to offer the 1.8.x driver as an extension...

I can't judge here but before telling this you should begin from start.
First step: retrieve LO code then try to build it.
(see https://wiki.documentfoundation.org/Development/GetInvolved)
Comment 5 prrvchr 2020-04-17 17:53:01 UTC
(In reply to Robert Großkopf from comment #3)

> But I don't know what a driver for a GoogleContact integration has to do with a
> connection from HSQLDB 2.5.0. Isn't there a original JDBC-driver available for HSQLDB 2.5.0?

gContactOOo is just a personal project which forced me to use hsqldb 2.5.0.
The goal is to use LibreOffice as billing or correspondence tools, namely to be able to send emails coming from the fusion of documents with your Android phone's addresses.

> Don't know if this one has anything to do with bug 34411. Bug 34411 is about
> using internal and external databases in different HSQLDB-versions.

Surely and maybe this one too 125618

(In reply to Julien Nabet from comment #4)

> I can't judge here but before telling this you should begin from start.
> First step: retrieve LO code then try to build it.

I take note, but it will take me a little time, I must change my laptop ... can not compile on this one ...
Comment 6 prrvchr 2020-04-21 12:03:31 UTC
If I use the openjdk-11-jre-headless for amd64 version (in place of Oracle JRE 1.8.0_201), the problem is the same, but the error message changes:

> uno.com.sun.star.sdbc.SQLException:
> Receiver class org.hsqldb.jdbc.JDBCPreparedStatement does not implement
> the interface java.sql.CallableStatement defining the method to be called
> (org.hsqldb.jdbc.JDBCPreparedStatement is in unnamed module of loader
> java.net.URLClassLoader @2e7290b4; java.sql.CallableStatement is in module
> java.sql of loader 'platform') PreparedStatement.executeQuery()
> ERROR: Receiver class org.hsqldb.jdbc.JDBCPreparedStatement does not implement
> the interface java.sql.CallableStatement defining the method to be called
> (org.hsqldb.jdbc.JDBCPreparedStatement is in unnamed module of loader
> java.net.URLClassLoader @2e7290b4; java.sql.CallableStatement is in module
> java.sql of loader 'platform') - None

Maybe this message will seem more explicit to someone?
Comment 7 prrvchr 2021-01-11 21:15:12 UTC
Hi all,

I finally managed to solve these problems:

- HsqlDB is now usable in Base with the latest version 2.5.1 (or any other version) and we can even see the HsqlDB users in Base -> Tools -> User administration ... (read only for the moment) with the HsqlDBDriverOOo extension (see bug 139538 for more details)

- "java.lang.IncompatibleClassChangeError" error has been fixed by replacing connection.prepareStatement() by connection.prepareCall() (if you claim a com.sun.star.sdbc.PreparedStatement I return a com.sun.star.sdbc.CallableStatement ...), because who can more can less... but this is a workaround and I still can't explain what is going on.

Voila...