Bug 1258913

Summary: The driver class 'com.mysql.jdbc.Driver' could not be loaded
Product: [Fedora] Fedora Reporter: Honza Horak <hhorak>
Component: libreofficeAssignee: Stephan Bergmann <sbergman>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: caolanm, dtardon, erack, ltinkl, mstahl, sbergman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-02 08:50:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Honza Horak 2015-09-01 14:04:09 UTC
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
libreoffice-base-4.3.7.2-9.fc21.x86_64
mysql-connector-java-5.1.28-3.fc21.noarch

How reproducible:
everytime

Steps to Reproduce:
1. Create database connection using MySQL(JDBC)

Actual results:
The driver class 'com.mysql.jdbc.Driver' could not be loaded.

Expected results:
connection works

Additional info:
after setting class path by Tools -> Options -> LibreOffice -> Advanced -> Class Path -> Add Archive to /usr/share/java/mysql-connector-java.jar it starts working.

Comment 1 Stephan Bergmann 2015-09-02 08:50:45 UTC
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.)

Comment 2 Honza Horak 2015-09-02 09:16:56 UTC
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.

Comment 3 Stephan Bergmann 2015-09-02 09:37:11 UTC
(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.

Comment 4 Honza Horak 2015-09-02 11:22:43 UTC
Ah, ok then, thanks for explanation..