Bug 1258913 - The driver class 'com.mysql.jdbc.Driver' could not be loaded
Summary: The driver class 'com.mysql.jdbc.Driver' could not be loaded
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libreoffice
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephan Bergmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-01 14:04 UTC by Honza Horak
Modified: 2015-09-02 11:22 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-09-02 08:50:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Document Foundation 93849 0 None None None Never

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..


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