Confusing error message when secondary .so file not loaded
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- operating-systems
Research direction
Start by tracing the native library loading path using jna.library.path and the UnsatisfiedLinkError reported for myapp.jar with libx.so and liby.so. Reproduce the case where libx.so loads but a call reaches liby.so, then verify whether the final message identifies the library that actually failed to load.
Written by the indexing model from the issue text.
Description
I have two sharable object files, libx.so and liby.so, both in the same dir as myapp.jar.
I have set jna.library.path= to that dir.
My java code loads 'a' successfully, and can call a method in it.
But if that method calls a method in b, I get an UnsatisfiedLinkError with the message:
'Unable to load library 'example': Native library (linux-x86-64/libx.so) not found in resource path ([file:/this/that/myapp.jar])'.
I have a hunch that there's no problem to load libx.so, the problem is with liby.so.
The exception message is most probably misleading.
By the way, libx.so is NOT in any subdir linux-x86-64.
Please have a check and see if the exception message can be made more correct and informative.
- Dominant language
- Java
- Stars
- 8.9k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from java-native-access/jna
-
Difficulty 4/5 3-5 days Newbie friendliness 66/100
java-native-access/jna#1738 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
java-native-access/jna#1736 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
java-native-access/jna#1717 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
java-native-access/jna#1700 · 11 comments ·
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
java-native-access/jna#1698 · 1 comment ·
All issues in java-native-access/jna
Similar issues
-
Bug Java Platform: Java
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-java#6138 · 1 comment ·
-
bug needs triage p2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100