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

[Java][FlightSQL] Native libraries are not properly relocated #44564

Closed
laurentgo opened this issue Oct 29, 2024 · 1 comment
Closed

[Java][FlightSQL] Native libraries are not properly relocated #44564

laurentgo opened this issue Oct 29, 2024 · 1 comment

Comments

@laurentgo
Copy link
Collaborator

Describe the bug, including details regarding any error messages, version, and platform.

The netty native libraries shipped with the FlightSQL JDBC driver are relocated to avoid a conflict with existing libraries present in the classpath, but the relocation prefix is incorrect and prevent Netty to actually load them (or possibly load different libraries than the ones shipped with the driver)

Current prefix is oaadj but for Netty to correctly detect relocation prefix should match the one used by Netty NativeLibaryLoader class (with . replaced with _ as explained at https://github.com/netty/netty/blob/047bdfe4860c077f5f4318742d6427d0f84c5c3a/common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java#L138)

Component(s)

Java

@laurentgo laurentgo self-assigned this Oct 29, 2024
laurentgo added a commit to laurentgo/arrow that referenced this issue Oct 29, 2024
Prefix used by native libraries shipped in the JDBC driver do not match
the prefix used by Netty `NativeLibraryLoader` class, preventing them to
be detected and loaded.

Change the prefix of the libraries and add a integration test to verify
the libraries are loaded

Also exclude several group of data which are not properly relocated and
may cause conflict with existing classpath.
lidavidm pushed a commit that referenced this issue Oct 30, 2024
### Rationale for this change

Prefix used by native libraries shipped in the JDBC driver do not match the prefix used by Netty `NativeLibraryLoader` class, preventing them to be detected and loaded.

### What changes are included in this PR?

Change the prefix of the libraries and add a integration test to verify the libraries are loaded

Also exclude several group of data which are not properly relocated and may cause conflict with existing classpath.

### Are these changes tested?

Yes, new test added for checking the native library loader

### Are there any user-facing changes?

No

* GitHub Issue: #44564

Authored-by: Laurent Goujon <[email protected]>
Signed-off-by: David Li <[email protected]>
@lidavidm lidavidm added this to the 19.0.0 milestone Oct 30, 2024
@lidavidm
Copy link
Member

Issue resolved by pull request 44565
#44565

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants