Red Hat Bugzilla – Bug 1258913
The driver class 'com.mysql.jdbc.Driver' could not be loaded
Last modified: 2015-09-02 07:22:43 EDT
Description of problem:
I'm not able to connect to mysql database with libreoffice base without manual settings.
Version-Release number of selected component (if applicable):
# rpm -q libreoffice-base mysql-connector-java
Steps to Reproduce:
1. Create database connection using MySQL(JDBC)
The driver class 'com.mysql.jdbc.Driver' could not be loaded.
after setting class path by Tools -> Options -> LibreOffice -> Advanced -> Class Path -> Add Archive to /usr/share/java/mysql-connector-java.jar it starts working.
The shortcoming that "a JDBC driver class must be installed on your system and registered with LibreOffice" (cf. Database Wizard dialog text) appears to be well known. I filed upstream enhancement request <https://bugs.documentfoundation.org/show_bug.cgi?id=93849> "Allow specifying the JDBC jar in the Database Wizard" now to improve that.
(There is currently no infrastructure in the relevant code to pass the relevant jar's path, so no easy way to hardwire /usr/share/java/mysql-connector-java.jar as a Fedora quickfix. So probably best to wait for an upstream fix first and make sure that Fedora then indeed picks /usr/share/java/mysql-connector-java.jar by default.)
I'm not Java developer, but it seems to me very weird that system jars are not picked automatically.. Adding that feature seems to be better fix from my PoV.
(In reply to Honza Horak from comment #2)
> I'm not Java developer, but it seems to me very weird that system jars are
> not picked automatically.. Adding that feature seems to be better fix from
> my PoV.
That feature would need to be implemented in the JVM, not in LO.
Ah, ok then, thanks for explanation..