Page 1 of 1

Java Problems?

PostPosted: Thu Apr 25, 2019 4:22 pm
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?

Re: Java Problems?

PostPosted: Thu Apr 25, 2019 6:15 pm
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.

Re: Java Problems?

PostPosted: Thu Apr 25, 2019 6:16 pm
by RoryOF
@RusselB: Mac User!
32 bit Java should not be necessary.

Re: Java Problems?

PostPosted: Thu Apr 25, 2019 6:44 pm
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 
.

Re: Java Problems?

PostPosted: Thu Apr 25, 2019 9:27 pm
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.

Re: Java Problems?

PostPosted: Fri Apr 26, 2019 10:05 am
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?

Re: Java Problems?

PostPosted: Fri Apr 26, 2019 9:04 pm
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.

Re: Java Problems?

PostPosted: Fri Apr 26, 2019 9:27 pm
by Villeroy
No,no,no. Dont put any version other than 1.8 in that directory.