Bug 1258913 - The driver class 'com.mysql.jdbc.Driver' could not be loaded
The driver class 'com.mysql.jdbc.Driver' could not be loaded
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: libreoffice (Show other bugs)
21
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Stephan Bergmann
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-01 10:04 EDT by Honza Horak
Modified: 2015-09-02 07:22 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-02 04:50:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Document Foundation 93849 None None None Never

  None (edit)
Description Honza Horak 2015-09-01 10:04:09 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
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 04:50:45 EDT
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 05:16:56 EDT
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 05:37:11 EDT
(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 07:22:43 EDT
Ah, ok then, thanks for explanation..

Note You need to log in before you can comment on or make changes to this bug.