Bug 119091 - No access to mysql/mariadb databases using jdbc driver
Summary: No access to mysql/mariadb databases using jdbc driver
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-04 14:22 UTC by Robert Cabane
Modified: 2019-02-24 21:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Cabane 2018-08-04 14:22:40 UTC
Description:
Since LO 6.0, the connection to Mariadb databases is impossible by means of the jdbc driver (based onto mysql-connector-java).

Steps to Reproduce:
1. Create a database using Mariadb (or MySQL, it should be the same)
2. Try creating an access using LO Base (MySQL / jdbc)
3. Test the class com.mysql.jdbc.Driver (should be OK, it's the case by me)
4. Give username and password, and test the connexion

Actual Results:
LO Base error message : java.long.NoSuchMethodError:java.nio.CharBuffer.position(I)Ljava/nio/CharBuffer;

Expected Results:
Connexion to the database.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
It's still possible to connect with the direct MySQL native connector (mysql-connector-ooo) which works (at least) under LO 6.1, provided the user can (and is allowed to) install the corresponding extension.
See also
https://bugs.documentfoundation.org/show_bug.cgi?id=46259
Comment 1 Robert Cabane 2018-08-04 14:38:16 UTC
Notes :
- The bug wasn't there in LO 5.3, and seems to have appeared in 5.4 (not completely sure)
- The MySQL connector is the one I got from my Linux distribution (OpenSUSE 15.0)
, and its version is 5.1.43
- I'm not able to say whether it's an LO bug or a bug in the driver.
Comment 2 Robert Cabane 2018-08-04 14:44:49 UTC
I made a test using the most recent version of the driver (5.1.45). Nothing changed.
Comment 3 Robert Cabane 2018-08-04 15:00:09 UTC
News : I got a solution, installing the driver from Mariadb instead of the original one. That driver can be found here :
https://downloads.mariadb.org/connector-java/2.2.6/
and requires a slight adaptation within LO :
- adding the path to mariadb-java-client-226.jar in the options (advanced/classpath)
- declaring the right class of the driver (org.mariadb.jdbc.Driver) while creating the access in Base.
Comment 4 Robert Großkopf 2018-08-05 07:16:55 UTC
(In reply to Robert Cabane from comment #3)
> News : I got a solution, installing the driver from Mariadb instead of the
> original one. That driver can be found here :
> https://downloads.mariadb.org/connector-java/2.2.6/
> and requires a slight adaptation within LO :
> - adding the path to mariadb-java-client-226.jar in the options
> (advanced/classpath)
> - declaring the right class of the driver (org.mariadb.jdbc.Driver) while
> creating the access in Base.

So you got it working. Don't know why SUSE offers the JDBC-driver for MySQL and installs MariaDB.

Would be better to open a bugdescrition in SUSE. The mysql-connector runs with MariaDB also a long time. But with the last updates it fails here with Base also.

My system: OpenSUSE 15, MariaDB ...

Sould we close this one as WORKSFORME?
Comment 5 Robert Cabane 2018-08-05 07:37:21 UTC
Yes, I did so :
https://bugzilla.suse.com/show_bug.cgi?id=1103805
You can put a WORKSFORME here.