-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[jni 5.18.3] java.lang.UnsatisfiedLinkError: org.rocksdb.LRUCache.newLRUCache(JIZD)J #6789
Comments
@ChengGit Have you called |
Hi @adamretter , no I didn't explicitly call that method, should I do it for verification? |
@ChengGit that would seem like a good idea. |
Thanks @adamretter , I tried to add a constructor
here is my config code (with static modifier removed for cache and writeBufferManager)
I wanted to keep |
@ChengGit Instead you should just put:
Inside the class declaration of the first class you use that interacts with RocksDB. |
@adamretter many thanks for your patience! It runs with no error - I put the static code block inside my main class where
Does it imply all native libraries are packaged? |
I am not sure what you mean, and I can't really comment on how Kafka works. I think we have solved your issue, so I am going to close the ticket. Feel free to re-open if it isn't right |
Thanks @adamretter, yeah I confirm adding static block to where this config class was firstly referenced did the trick.
Please nevermind that - I added information of unrelated context to this thread. May I have one more question on this though, what does |
It extracts the native library from the jar file and add loads it into memory. |
Tests were failing with " “java.lang.UnsatisfiedLinkError: 'long org.rocksdb.LRUCache.newLRUCache(long, int, boolean, double)'”". Fixed following suggestion form facebook/rocksdb#6789
Tests were failing with " “java.lang.UnsatisfiedLinkError: 'long org.rocksdb.LRUCache.newLRUCache(long, int, boolean, double)'”". Fixed following suggestion form facebook/rocksdb#6789
Tests were failing with " “java.lang.UnsatisfiedLinkError: 'long org.rocksdb.LRUCache.newLRUCache(long, int, boolean, double)'”". Fixed following suggestion form facebook/rocksdb#6789
Descriptions of the changes in this PR: Fixed tests for /stream, RocksDB initialization. Same as #2551 but for master branch ### Motivation Tests were failing with " “java.lang.UnsatisfiedLinkError: 'long org.rocksdb.LRUCache.newLRUCache(long, int, boolean, double)'”". ### Changes Fixed following suggestion form facebook/rocksdb#6789 Added ` static { RocksDB.loadLibrary(); }` to extract the native library from the jar file etc. Master Issue: #2550 Reviewers: Enrico Olivelli <eolivelli@gmail.com> This closes #2554 from dlg99/master-streams-tests
Descriptions of the changes in this PR: Fixed tests for /stream, RocksDB initialization. Same as #2551 but for master branch ### Motivation Tests were failing with " “java.lang.UnsatisfiedLinkError: 'long org.rocksdb.LRUCache.newLRUCache(long, int, boolean, double)'”". ### Changes Fixed following suggestion form facebook/rocksdb#6789 Added ` static { RocksDB.loadLibrary(); }` to extract the native library from the jar file etc. Master Issue: #2550 Reviewers: Enrico Olivelli <eolivelli@gmail.com> This closes #2554 from dlg99/master-streams-tests (cherry picked from commit 73b4cd4) Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
Descriptions of the changes in this PR: Fixed tests for /stream, RocksDB initialization. Same as #2551 but for master branch ### Motivation Tests were failing with " “java.lang.UnsatisfiedLinkError: 'long org.rocksdb.LRUCache.newLRUCache(long, int, boolean, double)'”". ### Changes Fixed following suggestion form facebook/rocksdb#6789 Added ` static { RocksDB.loadLibrary(); }` to extract the native library from the jar file etc. Master Issue: #2550 Reviewers: Enrico Olivelli <eolivelli@gmail.com> This closes #2554 from dlg99/master-streams-tests (cherry picked from commit 73b4cd4) Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
Descriptions of the changes in this PR: Fixed tests for /stream, RocksDB initialization. Same as #2551 but for master branch ### Motivation Tests were failing with " “java.lang.UnsatisfiedLinkError: 'long org.rocksdb.LRUCache.newLRUCache(long, int, boolean, double)'”". ### Changes Fixed following suggestion form facebook/rocksdb#6789 Added ` static { RocksDB.loadLibrary(); }` to extract the native library from the jar file etc. Master Issue: #2550 Reviewers: Enrico Olivelli <eolivelli@gmail.com> This closes #2554 from dlg99/master-streams-tests (cherry picked from commit 73b4cd4) Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
Hi friends,
I am on
MacOS 10.14.6
,kafka:2.4.0
, which depends onrocksdbjni:5.18.3
, and I bumped into this error when kafka streams tried to create a RocksDBConfigSetter instance during bootstrap:I use this RocksDBConfigSetter from kafka official document: https://kafka.apache.org/24/documentation/streams/developer-guide/memory-mgmt.html#rocksdb
and it throws error on this line:
Could this be a libc link issue? Could you shed some light on it?
Expected behavior
I would expect LRUCache be initialised and hen kafka-streams application can bootstrap.
Actual behavior
I see a UnsatisfiedLinkError, and it seems failed to link to a native method
newLRUCache
The text was updated successfully, but these errors were encountered: