Problem installing latest JDBC driver

Over the last couple of years, I’ve received A LOT of invaluable assistance from the helpful experts here as I biult a small hobby DB. I’ve now reached a point where the limitations and clunkiness of that ‘practice’ DB have prompted me to begin prepping for a new version, and in doing so I have thought about the one piece of advice most often given here to any and all of my queries (pun unavoidable) : “Don’t use embedded”

Having watched the excellent Base video turial series at thefrugalcomputerguy.com where he connected Base to MySQL, and having read the sections in tyhe Base guide about connecting to external DBs, I no longer feel overwhelmed by the idea. I’d love to combine the familiar GUI of Base with the added stability of an external DB, but I have already run into some confounding problems.

First, the JDBC drivers. On the LO extensions page, it lists several driver extensions needed to enaable LO to connect with the latest versions of Firebird, HSQLDB and others. All of those extensions said that the first thing that had to be installed was the latest JDBC driver. So I downloaded and attempted to install it. I got the following error message:

(com.sun.star.uno.RuntimeException) { { Message = "[jni_uno bridge error] UNO calling Java method writeRegistryInfo: non-UNO exception occurred: java.lang.UnsupportedClassVersionError: io/github/prrvchr/jdbcdriver/RegistrationHandler has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0\X000ajava stack trace:\X000ajava.lang.UnsupportedClassVersionError: io/github/prrvchr/jdbcdriver/RegistrationHandler has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0\X000d\X000a\X0009at java.lang.ClassLoader.defineClass1(Native Method)\X000d\X000a\X0009at java.lang.ClassLoader.defineClass(Unknown Source)\X000d\X000a\X0009at java.security.SecureClassLoader.defineClass(Unknown Source)\X000d\X000a\X0009at java.net.URLClassLoader.defineClass(Unknown Source)\X000d\X000a\X0009at java.net.URLClassLoader.access$100(Unknown Source)\X000d\X000a\X0009at java.net.URLClassLoader$1.run(Unknown Source)\X000d\X000a\X0009at java.net.URLClassLoader$1.run(Unknown Source)\X000d\X000a\X0009at java.security.AccessController.doPrivileged(Native Method)\X000d\X000a\X0009at java.net.URLClassLoader.findClass(Unknown Source)\X000d\X000a\X0009at java.lang.ClassLoader.loadClass(Unknown Source)\X000d\X000a\X0009at java.lang.ClassLoader.loadClass(Unknown Source)\X000d\X000a\X0009at java.net.FactoryURLClassLoader.loadClass(Unknown Source)\X000d\X000a\X0009at java.lang.ClassLoader.loadClass(Unknown Source)\X000d\X000a\X0009at com.sun.star.comp.loader.RegistrationClassFinder.find(RegistrationClassFinder.java:53)\X000d\X000a\X0009at com.sun.star.comp.loader.JavaLoader.writeRegistryInfo(JavaLoader.java:376)\X000d\X000a", Context = (com.sun.star.uno.XInterface) @0 } }

This feels like stumbling at the very first baby step, so while I continue to sketch out my DB design and work out what I want it to be able to do, how do I fix this problem so that I can coonect to more recent external databases?

Which database do you want to connect with Base? If you want to connect by JDBC there is no special driver of LO. You have to look for JDBC-packages for your database.

I’m planning on trying Firebird, or possibly HSQLDb. It seems like I now need to do a lot more reading on how to ssetup JDBC (and/or ODBC) for those databaes.

The error message tells it all. You are using one of those drivers made by @prrvcr.

I’m completely new to external databases, and obviously I’ve blundered here, but I’m interested in finding out what I’ve done wrong, and what I should have done.

The Base extensions all suggest that they are ncessary in order for Base to connect with newer/newest versions of HSl, Firebird etc, which is why I thought to install them.

Using Base as a GUI is important for me as my motor skills dceline - the less typing of SQL that I need to do, the better. But I would of course love to have the stability of an external DB. So what is the correct way to go about setting it up?

I don’t mind trying different DBs as much of this hobby is specifically about trying to slow down cognitive decline, so making mistakes and seeking to learn from them is part of the process

You could download JDBC-driver directly for every database.
JDBC-Driver for Firebird
LibreOffice Base could connect to Firebird 3 directly. If you only wish to use an external version of the internal Firebird database file you could create a direct connetion to Firebird by LibreOffice. Firebird file will be created for this connection.
You could also Move from internal Firebird file to external Firebird file. The internal file will be unpacked to temporary folder when Base file has been opened and connected to Firebird.

1 Like

Thank you for that clear explanation. Having had the process demystified, I’m planning toi start from scratch. The internal Base DB I’ve been building over the last few years has become an embarrassing reminder of what poor job I did of designing it, so I’m taking my time to get the design better before starting all over again, this time with a fully external DB to avoid the risks inherent in the odb format

Typing less SQL is a promise, Base can not hold. To the contrary, you get far better results from plain simple SQL code, manually typed into some text editor. Base’s SQL window does not provide any search/replace. Any editor with syntax highlighing for programming language will do the job.

Start with some embedded DB. @RobertG prefers Firebird, I am a HSQL fanboy. Proper data types and relations are essential. Based on this skeleton, queries, forms and reports will follow. The development may take days or weeks. The result can be used for years to come without any modification other than editing data.
Once you have some embedded database up and working, it is fairly simple to free the database from the Base document.

The attached Writer template is more like a fun project. It generates a database skeleton with a one-to-many, a many-to-many and a one-to-one relation.
In the table you can modify the names of tables and columns by editing the text field variables in the right column.
The frame has the finished SQL code which you may complement with more tables, columns, relations.
You can’t paste this code directly into Base’s SQL window. The field values are not preserved. However, you can copy the code into a plain text editor and from there into the SQL window. This generates the whole database in one go. I’ve tested the SQL code with embedded Firebird and HSQL.
Create_Database_Tables1.ott (38.3 KB)

1 Like

That is VERY kind of you, thank you! My preference for using a GUI where possible is simply a reflection of the fact that typing is increasingly difficult for me. 20 years ago, I was an eager recruit for the GNU Emacs army in the holy war against Vi, but over the years, my dependence on alternatives to typing has grown. I use Dragon Speech recognition A LOT, and when it comes to SQL, even a simple, short line can take a very, very long time to type, since I have to get it exactly right with no typing errors at all. That was one reason why I did start with an embedded HSQLDb in Base, but now that the limitations and omissions of that starter project are annoying me too much, I’ve decided to try again ad learn more new things by building an external DB from scratch. Either HSQl or Firebird, or possibly even both, since it’s just an en exercise in keeping my ind active

Use Emacs with some SQL mode and well prepared text snippets. This will help you a lot more than Base.
From my template: create table tbl(n varchar(30), id int generated by default as identity primary key) (all lower case and unquoted) generates a two column list “TBL” with names in column “N” and auto-IDs in column “ID”.
The resulting names are upper case. Lower case or mixed case names require quoting. In my template, I quote everything, so you can use names with lower case letters. All SQL keywords need to be quoted when used as names.
Once you start designing the user interface (forms and reports), you can replace all the short upper case names with human readable ones.

1 Like

Just seeking to confirm I’ve understood this correctly: Earlier this week, I did download Jaybird 5.0.6, as I have Jave 8 installed. Can I use it to connect my Firebird 4.0.2 to LO Base 24.8.3 if I decide to?

@UncleRobin : I you wan’t to connect directly to a file you have t use the internal driver, which only supports Firebird 3.* at this moment. If you want to connect to a server you could use the JDBC connector you have downloaded.

1 Like

That’s great, thanks. That means I did grok it properly. Kinda chuffed since it’s 05:00 and I’ve been working since 21:00 :slight_smile:

Bothe frugalcomputerguy tutorial and the base guide have made connecting via JDBC seem within my range, so I will try creating a DB on localhost and connecting to it via Base. The embedded Base DB I’ve been building over the last few years is missing key info and I’m currently creating calc files of that missing info for importing as tables when I’m ready. I’ve already exported the table definitions of the current DB to act as a guide for the new ones and have screenshotted my relationships diagram. Trying t o spend more time planning and less time building