Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

12.4.1 fails to deploy in OSGi environment without com.ibm.lang.management #2207

Closed
MrEasy opened this issue Aug 31, 2023 · 6 comments · Fixed by #2209
Closed

12.4.1 fails to deploy in OSGi environment without com.ibm.lang.management #2207

MrEasy opened this issue Aug 31, 2023 · 6 comments · Fixed by #2209
Labels
Bug A bug in the driver. A high priority item that one can expect to be addressed quickly.

Comments

@MrEasy
Copy link
Contributor

MrEasy commented Aug 31, 2023

Driver version

12.4.1

SQL Server version

Microsoft SQL Server 2019 (RTM-GDR) (KB5014356) - 15.0.2095.3 (X64) Apr 29 2022 18:00:13 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro 10.0 (Build 22000: ) (Hypervisor)
(but unrelated to issue)

Client Operating System

Win 11 (but unrelated)

JAVA/JVM version

17.0.4 (but unrelated)

Problem description

This change here: https://github.com/microsoft/mssql-jdbc/pull/2198/commits

added an explicit dependency to com.ibm.lang.management in META-INF/MANIFEST.MF.

As a result, the driver will not deploy anymore in an OSGi environment without that dependency:

The class is loaded via reflection, but the maven-bundle-plugin is too 'intelligent', recognizes it and constructs a mandatory import for it.
You need to explicitly declare the dependency as optional in pom.xml. See pull request #2208.
See #1892 for a very similar issue.

Expected behavior

Dependency declared optional and deploying without successfully.

@lilgreenbird
Copy link
Contributor

hi @MrEasy

thanks this we will look into a fix

@MrEasy
Copy link
Contributor Author

MrEasy commented Sep 5, 2023

#2209 also addresses this

@krismarc
Copy link

krismarc commented Sep 6, 2023

@Jeffery-Wasty and this one when will be released? Not sure why the class being checked was changed in the last moment.

@Jeffery-Wasty
Copy link
Contributor

Jeffery-Wasty commented Sep 6, 2023

Hi @krismarc,

EDIT: 12.4.2 is delayed for the time being. Will update when we have a date again.

This change will be included in an additional hotfix for 12.4, 12.4.2. We don't currently have a date for this release, but are working to get this out as soon as we can.

The change was made as, while the class check is more robust, it requires additional changes in other files that we did not want to make. The vm.name and vendor.name check does the same job and is contained to only the one file.

@lilgreenbird lilgreenbird added the Bug A bug in the driver. A high priority item that one can expect to be addressed quickly. label Sep 6, 2023
@Jeffery-Wasty
Copy link
Contributor

@MrEasy, do you have a workaround for this issue at the moment? We're unable to test in an OSGi environment, so we can't confirm whether a workaround exists, but we believe some fiddling with the manifest files should give a temporary resolution. The hotfix is currently scheduled for Sept 21, but this may change depending on the availability of a current workaround.

@MrEasy
Copy link
Contributor Author

MrEasy commented Sep 7, 2023

Hi, workaround is to edit the manifest and add the ;resolution:=optional, yes.
Or doing that in a fork and build it accordingly, but our actual way of handling it though is to not yet update to 12.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in the driver. A high priority item that one can expect to be addressed quickly.
Projects
Status: Closed Issues
4 participants