KafkaStream 运行报错java.lang.UnsatisfiedLinkError: XXX\librocksdbjniXXXX.dll: Can't find dependent libraries

运行环境:windows10+jdk1.8+Intellij+Kafka-streams1.0.0

具体现象:

Caused by: java.lang.UnsatisfiedLinkError: C:\Users\kobi\AppData\Local\Temp\librocksdbjni3993939733537201067.dll: Can't find dependent libraries

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)

at java.lang.Runtime.load0(Runtime.java:795)

at java.lang.System.load(System.java:1062)

at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLibraryLoader.java:78)

at org.rocksdb.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:56)

at org.rocksdb.RocksDB.(RocksDB.java:23)

at org.rocksdb.ColumnFamilyOptions.(ColumnFamilyOptions.java:22)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

原因:

       windows电脑上没有安装 :Microsoft Visual C++ 2015 Redistributable。

解决办法:

        从https://www.microsoft.com/en-us/download/details.aspx?id=48145下载Microsoft Visual C++ 2015 Redistributable 并安装。

参考资料:

         https://github.com/facebook/rocksdb/wiki/RocksJava-Basics

        https://stackoverflow.com/questions/41291996/executing-kafka-stream-example-with-eclipse-fails-with-unsatisfiedlinkerror-for

你可能感兴趣的:(KafkaStream 运行报错java.lang.UnsatisfiedLinkError: XXX\librocksdbjniXXXX.dll: Can't find dependent libraries)