View previous topic :: View next topic |
Author |
Message |
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Wed Jan 19, 2022 2:51 pm Post subject: LIbreOffice Base connection problem SOLVED |
|
|
Trying to use libreOffice Base but connection fails. The same works well on my xubuntu laptop. LibreOffice was first installed compiled from source (a 20 hour process), then I emerged mysql-client but still the same problem. Then I deselected these and emerged libreoffice-bin - same connection error.
Wanted to paste the jpg file of screenshot window of his error using but the output was Quote: | Apparently nothing was received. | .
Here is the copied text of screenshot error: ... An unknown error occurred. The driver is probably defective. /tmp/portage/app-office/libreoffice-7.1.7.2/work/libreoffice-7.1.7.2/connectivity/source/commontools/dbexception.cxx:399
I also do nut understand the massage after the successful merge of libreoffice-bin: Quote: | * If you plan to use the Base application you should use a source build and enable java and firebird. | Base is available and it is the subject of this message.
After searching the net I'm turning to this forum for help.
SOLVED - see my post of 2022 February 1.
Janos
Last edited by jankom on Tue Feb 01, 2022 8:37 pm; edited 1 time in total |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3134
|
Posted: Wed Jan 19, 2022 5:38 pm Post subject: |
|
|
I don't think you can upload images to a service designed for sharing text logs.
What connection string did you use there?
Quote: | * If you plan to use the Base application you should use a source build and enable java and firebird. |
It means USE flags. LO and OO have some components written in java. Base itself might be present, but it doesn't imply all database connection drivers are there.
It can connect to an external database server or store data in a local file, using it's own DB format after all.
Also, AFAIR some wizzards used by base are written in java, so not having it limits your UI.
Hint: Start with doing what portage says. Install from source (the one without -bin suffix) and make sure you have specified USE flags enabled. |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Wed Jan 19, 2022 6:17 pm Post subject: szatox - thx |
|
|
I don't know. Registered the .odb file on the newly installed LibreOffice, then opened base module in LibreOffice. In the opening screen it offered the registered .odb file as an existing database. Opening succeeded same way as in my xubuntu laptop. Then I clicked on Tables or one of my Forms and it asked for password - again, same as in xubuntu laptop. After entering the password the error window popped up that I tried to attach as a file. On xubuntu after entering the password the form opened or a list of my tables showed up.
Quote: | Reinstall compiled: | OK, I'll do that with all recommended USE flags. Will report - hopefully as SOLVED to close this issue.
Janos |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Fri Jan 21, 2022 9:42 am Post subject: Update after compiling |
|
|
Added the following line to /etc/portage/package.use file: Code: | app-office/libreoffice base java firebird | as recommended, then installation-compie completed. But...
still cannot connect. Here is the error message: Quote: | The connection to the data source "penztar" could not be established.
Error code: 1000
The driver class 'com.mysql.jdbc.Driver' could not be loaded. /var/tmp/portage/app-office/libreoffice-7.1.7.2/work/libreoffice-7.1.7.2/connectivity/source/drivers/jdbc/JConnection.cxx:687
Error code: -1
com/mysql/jdbc/Driver /var/tmp/portage/app-office/libreoffice-7.1.7.2/work/libreoffice-7.1.7.2/connectivity/source/drivers/jdbc/Object.cxx:189 |
The setting is the same as in my xubuntu laptop. |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Fri Jan 21, 2022 9:59 am Post subject: Update again |
|
|
Just for debugging I created a test database, and it DID connect. However, my test database is not password protected, and it was created on this gentoo machine.
Then I adjusted mysql settings on the xubuntu laptop, modified firewall on that machine, and now I'm able to connect to the database from the Gentoo machine from terminal with command: Code: | mysql --host=192.168.0.nnn --user=foo --password=xxx <database name> | and I could perform msql statements.
So basic connection works now. Hewver - libreoffice base still cannot connect.
I've set up Tools -> Options -> Advanced -> Java Options: Temurin with Class Path mysql-connector-java-8.0.28.jar
What is wrong? |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 322 Location: USA
|
Posted: Tue Feb 01, 2022 9:36 pm Post subject: SOLVED - it works now |
|
|
LibreOffice .odb file is on a remote machine. Home WiFi network. The remote machine is the server (xUbuntu laptop) and the problem was accessing the file from a client machine (fitlet2, Gentoo). The solution is proper settings of the complex interaction of networking (firewall) and mysql on both machines.
(1) On the client machine mysql was installed as in my post of Jan 21: /etc/portage/package.use file Code: | app-office/libreoffice base java firebird | Here is the important part. "firebird" is for an embedded database, not database on a database server.
(2) On the client machine we need the connector as well Code: | emerge -a dev-db/mariadb-connector-c |
(3) Setting of LibreOffice on the client macine Quote: | Tools - Options - Advanced - Java Options | defaults to "Temurin 1.8.0_312" and which is mysql-connector-java-8.0.28.jar
(4) On the server machine port 3306 has to be open on the firewall otherwise the connector is not getting response packets.
(5) On the server machine mysqld.conf file has to be changed Code: | bind-address = 0.0.0.0 | so that the mysql database (actually mariadb) may be available to a remote machine on network.
(6) On the server machine, in the "mysql" database, "user" table the "host" column is set to "%" meaning that any IP or host name can access (connect to) the database server used by the LibreOffice .odb file.
(7) On the server machine the foo.odb file (that is accessed by the remote client machine) make sure that Quote: | Edit - Database - Properties... - Additional Settings tab - Host name: | is set to the IP of the server machine. In my case: 192.168.0.nnn
I hope I did not miss anything.
Janos |
|
Back to top |
|
|
|