Bug 125618 - JavaDriverClassPath doesn't modify JVM ClassPath
Summary: JavaDriverClassPath doesn't modify JVM ClassPath
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.2.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-01 12:04 UTC by prrvchr
Modified: 2021-08-13 03:55 UTC (History)
4 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 prrvchr 2019-06-01 12:04:32 UTC
Description:
If you connect to DataBase with XDriverManager.getConnectionWithInfo():

JavaDriverClassPath put in Info is not added to the User ClassPath.

As a workaround you must add JDBC driver tar file in Tools - Options - LibreOffice - Advanced - Class Path... - Add Archive...

Steps to Reproduce:
1. Install gDriveOOo (or oneDriveOOo or DropboxOOo) with the required extensions (OAuth2OOo and CloudUcpOOo) from; https://github.com/prrvchr/gDriveOOo
2. Try to connect after installation: Don't work...
3. Add User ClassPath like: https://github.com/prrvchr/CloudUcpOOo/blob/master/README.md after restart work fine...

Actual Results:
Need modification of User ClassPath like: https://github.com/prrvchr/CloudUcpOOo/blob/master/README.md after restart work fine...

Expected Results:
No need modification of User Class Path (like in OpenOffice)


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Xisco Faulí 2020-02-18 16:50:31 UTC
Hello,
A new major release of LibreOffice is available since this bug was reported.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 prrvchr 2020-04-14 22:54:06 UTC
Hi,

I confirm that I can reproduce the bug with version 6.4.2.2 under Linux.
Apparently it doesn't happen on Windows.

I install LibreOffice under Ubuntu using the PPA:
http://ppa.launchpad.net/libreoffice/ppa/ubuntu
in order to access the latest versions.

the workaround is to not install or uninstall the following packages:
- libreoffice-sdbc-hsqldb
- libhsqldb1.8.0-java

It is possible to reproduce the malfunction by installing these two extensions:

- https://github.com/prrvchr/OAuth2OOo/blob/master/OAuth2OOo.oxt
- https://github.com/prrvchr/gContactOOo/blob/master/gContactOOo.oxt

Although the jar archive of Hsqldb 2.5.0 is present in the gContactOOo extension, it cannot be used if the integrated hsqldb driver is installed.
Comment 3 Stephan Bergmann 2020-04-15 10:38:13 UTC
Do you have some information about the actual failure you experience (like the backtrace of a thrown java.lang.NoClassDefFoundError)?

As documented at offapi/com/sun/star/sdbc/JDBCConnectionProperties.idl and implemented at connectivity/source/drivers/jdbc/JConnection.cxx, JavaDriverClassPath is only used by the class loader that loads JavaDriverClass.  It is not meant to end up on the global class path that can be modified via "Tools - Options... - LibreOffice - Advanced - Class Path..."

(By the way, <https://github.com/prrvchr/CloudUcpOOo/blob/master/README.md> as retrieved right now does not contain any information on "modification of User ClassPath" that you mention in comment 0.)
Comment 4 prrvchr 2020-04-15 11:45:59 UTC
Hi Stephan,

If you want to reproduce the problem just install the extension gContactOOo:
https://github.com/prrvchr/gContactOOo/blob/master/gContactOOo.oxt
and during the first launch a test is made on the version of the Hsqldb driver loaded and if the version is correct the database is created... else an error occurs and displays the version of hsqldb.jar currently loaded.

I have two options to work around the problem:

Not install or uninstall the following packages:
- libreoffice-sdbc-hsqldb
- libhsqldb1.8.0-java

Add hsqldb.jar to the global class path that can be modified via "Tools - Options... - LibreOffice - Advanced - Class Path...

I think the title is wrong, the JVM ClassPath is well modified but the jar archive is not placed at the beginning of the ClassPath...
Comment 5 prrvchr 2020-04-18 09:35:41 UTC
(In reply to Stephan Bergmann from comment #3)

> JavaDriverClassPath is only used by the class loader that loads JavaDriverClass.
> It is not meant to end up on the global class path

I do not know what happening in Java, but what is certain is that it is impossible to use an archive already present on the system, because if exists it is loaded ...

And this is confirmed by the possibility of getting around the problem by not installing the basic drivers. (for me package is: libreoffice-sdbc-hsqldb and libhsqldb1.8.0-java)

it should also be noted that I did not manage to reproduce the problem under Windows where everything seems to work correctly (and the same under OpenOffice).
Comment 6 Xisco Faulí 2020-11-18 15:25:55 UTC
Hello prrvchr@gmail.com,
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 7 QA Administrators 2021-07-13 03:39:53 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2021-08-13 03:55:30 UTC
Dear prrvchr,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp