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.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no leveldbjni64-1.8 in java.library.path #80

Open
icehong opened this issue Oct 14, 2016 · 10 comments

Comments

@icehong
Copy link

icehong commented Oct 14, 2016

I am running opendaylight beryllium verison on windows 7 x64, I and got such error when startup karaf framework. I think leveldbjni crash because of lack of some system dlls, see the logs and screen capture.

E:\odl\distribution-karaf-0.4.3-Beryllium-SR3\bin>karaf
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; sup
port was removed in 8.0

________                       ________                .__  .__       .__

__
_____ \ ______ ____ ____ ______ \ _____ ..| | || __ | |_
/ |
/ | ____ / __ \ / \ | | _ < | || | | |/ | |
\ __
/ | \ |
> > ___/| | | ` / __ _
|| || / // > Y
\ |
_______ / / _ >| /____ (____ / ||/_ /||
/
|
/|**| / / / // /
__**/
/

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

opendaylight-user@root>
opendaylight-user@root>
opendaylight-user@root>
opendaylight-user@root>
opendaylight-user@root>Uncaught error from thread [opendaylight-cluster-data-akk
a.persistence.dispatchers.default-plugin-dispatcher-22] shutting down JVM since
'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[opendaylight-cluster-d
ata]
java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no leveldbjni6
4-1.8 in java.library.path, no leveldbjni-1.8 in java.library.path, E:\odl\distr
ibution-karaf-0.4.3-Beryllium-SR3\data\cache\org.eclipse.osgi\bundles\178\1.cp
META-INF\native\windows64\leveldbjni.dll: Can't find dependent libraries, E:\odl
\distribution-karaf-0.4.3-Beryllium-SR3\data\tmp\leveldbjni-64-1-534075808401160
7636.8: Can't find dependent libraries]
at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:187)
at org.fusesource.hawtjni.runtime.Library.load(Library.java:143)
at org.fusesource.leveldbjni.JniDBFactory.(JniDBFactory.java:48)

    at akka.persistence.journal.leveldb.LeveldbStore$class.leveldbFactory(Le

veldbStore.scala:36)
at akka.persistence.journal.leveldb.LeveldbJournal.leveldbFactory(Leveld
bJournal.scala:20)
at akka.persistence.journal.leveldb.LeveldbStore$class.preStart(LeveldbS
tore.scala:112)
at akka.persistence.journal.leveldb.LeveldbJournal.preStart(LeveldbJourn
al.scala:20)
at akka.actor.Actor$class.aroundPreStart(Actor.scala:472)
at akka.persistence.journal.leveldb.LeveldbJournal.aroundPreStart(Leveld
bJournal.scala:20)
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
at java.lang.Thread.run(Thread.java:745)
E:\odl\distribution-karaf-0.4.3-Beryllium-SR3\bin>

debug

@rishibamba
Copy link

Hi any fix for the same ?

Thanks.

@ghost
Copy link

ghost commented Mar 2, 2017

I ran into the same issue, after some investigation I (well mostly @vdmdmv) found that the problem was that the native source is dynamically linked against the Visual Studio 2010 runtime. It seems like a decent solution to this problem would be to package whatever runtime is being used like the native leveldb code gets packaged. The workaround @vdmdmv and I found was to just download and install the VS2010 redistributable package, after that everything worked fantastically

@ketank-new
Copy link

How to resolve this on Linux

@gvishal
Copy link

gvishal commented Jul 27, 2017

@following

@ghost
Copy link

ghost commented Jul 27, 2017

have you tried unzipping the jar and using ldd to figure out what runtime the jni library is linked against?

@gvishal
Copy link

gvishal commented Jul 28, 2017

I instead used RocksDb which has the same API and was working fine. See here:

dalab/pboh-entity-linking#4 (comment)

@ValleZ
Copy link

ValleZ commented Aug 1, 2017

I hit the same problem and the answer was that I included wrong library from maven. Instead
org.fusesource.leveldbjni:leveldbjni-all:1.8 it was org.fusesource.leveldbjni:leveldbjni:1.8. The latter doesn't contain any native libraries.

@anuscool
Copy link


T E S T S

Running org.fusesource.rocksdbjni.test.DBTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.286 sec <<< FAILURE! - in org.fusesource.rocksdbjni.test.DBTest
warning(junit.framework.TestSuite$1) Time elapsed: 0.022 sec <<< FAILURE!
junit.framework.AssertionFailedError:
Exception in constructor: testOpen (java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no rocksdbjni64-99-master-SNAPSHOT in java.library.path, no rocksdbjni-99-master-SNAPSHOT in java.library.path, /home/anupam/Arm_project/rocksdbjni/rocksdbjni-linux64/target/generated-sources/hawtjni/lib/META-INF/native/linux64/librocksdbjni.so: /home/anupam/Arm_project/rocksdbjni/rocksdbjni-linux64/target/generated-sources/hawtjni/lib/META-INF/native/linux64/librocksdbjni.so: undefined symbol: _ZTIN7rocksdb6LoggerE, /tmp/librocksdbjni-64-99-master-SNAPSHOT-162918278252525277.so: /tmp/librocksdbjni-64-99-master-SNAPSHOT-162918278252525277.so: undefined symbol: _ZTIN7rocksdb6LoggerE]
at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:187)
at org.fusesource.hawtjni.runtime.Library.load(Library.java:143)
at org.fusesource.rocksdbjni.JniDBFactory.(JniDBFactory.java:47)
at org.fusesource.rocksdbjni.test.DBTest.(DBTest.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

i am getting this error how to solve it

@shameem16
Copy link

I hit the same problem and the answer was that I included wrong library from maven. Instead
org.fusesource.leveldbjni:leveldbjni-all:1.8 it was org.fusesource.leveldbjni:leveldbjni:1.8. The latter doesn't contain any native libraries.

should we give this

org.fusesource.leveldbjni leveldbjni-all 1.8 in settings.xml of maven folder

@ghost
Copy link

ghost commented Apr 6, 2021

For me, installing the Microsoft Visual C++ 2010 redistributable package resolved this issue

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

No branches or pull requests

7 participants