Java Problems?

Discuss the database features
Post Reply
JE1
Posts: 2
Joined: Thu Apr 25, 2019 4:11 pm

Java Problems?

Post by JE1 »

When creating a new database, after naming the file and saving, I get this message.

The connection to the data source "NewDatabaseOpenOffice” could not be established.

The driver class 'org.hsqldb.jdbcDriver' could not be loaded.The additional driver class path is 'vnd.sun.star.expand:$OOO_BASE_DIR/program/classes/hsqldb.jar vnd.sun.star.expand:$OOO_BASE_DIR/program/classes/sdbc_hsqldb.jar'.

OpenOffice Preferences (Java) shows Oracle Corporation 12.0.1 is installed.

How do I resolve this?
Open Office 4.1.6 with Mac 10.11.6 El Capitan
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Java Problems?

Post by RusselB »

Please note that OpenOffice requires a 32 bit version of Java to be installed.
Having a 64 bit version will not work with OpenOffice, but you can have both 32 and 64 bit versions installed.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Java Problems?

Post by RoryOF »

@RusselB: Mac User!
32 bit Java should not be necessary.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Java Problems?

Post by UnklDonald418 »

The error message indicates you are using a JDBC connection but it can't find the database engine.
A typical database using a JDBC connection has a driver subdirectory containing the hsqldb.jar file.
 Edit: After a few tests and a little closer inspection of the error message.
The database is looking for the hsqldb.jar file using the path 'vnd.sun.star.expand:$OOO_BASE_DIR/program/classes/.
In my tests I get a similar dialog when that final sub-directory is missing, in your case /classes/.
When the hsqldb.jar file is missing from that sub-directory, I first get an error dialog: 'Please add a copy of the HSQLDB engine (hsqldb.jar) to the current folder'. If I choose Ignore in that dialog, then I also get the connection error dialog 
.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Java Problems?

Post by RusselB »

RoryOF wrote:@RusselB: Mac User!
32 bit Java should not be necessary.
I agree, but did it hurt to make the suggestion? Worst case scenario, as I can see, the user is right back to where they started when making the original post.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
JE1
Posts: 2
Joined: Thu Apr 25, 2019 4:11 pm

Re: Java Problems?

Post by JE1 »

UnklDonald418 wrote:The error message indicates you are using a JDBC connection but it can't find the database engine.
A typical database using a JDBC connection has a driver subdirectory containing the hsqldb.jar file.
 Edit: After a few tests and a little closer inspection of the error message.
The database is looking for the hsqldb.jar file using the path 'vnd.sun.star.expand:$OOO_BASE_DIR/program/classes/.
In my tests I get a similar dialog when that final sub-directory is missing, in your case /classes/.
When the hsqldb.jar file is missing from that sub-directory, I first get an error dialog: 'Please add a copy of the HSQLDB engine (hsqldb.jar) to the current folder'. If I choose Ignore in that dialog, then I also get the connection error dialog 
.

Thanks for this. Any advice on how to add that to the relevant folder?
Open Office 4.1.6 with Mac 10.11.6 El Capitan
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Java Problems?

Post by UnklDonald418 »

If you have a folder with the path shown in the error message then just put a copy of hsqldb.jar in it.
Since I don't have a Mac computer, I'm not sure how to add folders.
If you can't find hsqldb.jar somewhere on your computer then download a zip archive containing a version from
https://sourceforge.net/projects/hsqldb/files/hsqldb/
The hsqldb.jar file is in the /lib sub-directory of the zip archive.
The latest version is 2.4.1 but there have been reports of some issues using that with Base. I've used it with many of my databases without problems.
Version 2.3.4 would be a good alternative. I keep a copy of each handy in case problems arise.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Java Problems?

Post by Villeroy »

No,no,no. Dont put any version other than 1.8 in that directory.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply