我正在尝试使用eclipse IDE运行kafka-stream wordcount示例,但会出现以下错误: 我在我的pom文件中添加了0.10.1.0 kafka-client和0.10.1.0 kafka-stream作为依赖项。我还检查了依赖树,并使用rocksdbjni-4.9 jar。基于互联网上的一些阅读,这个问题已经在kafka的0.10.1.0版本上得到修复,但我还是得到了。 有什么帮助吗?
Exception in thread "StreamThread-1" java.lang.UnsatisfiedLinkError: Local\Temp\librocksdbjni6935746072594020003.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLibraryLoader.java:78)
at org.rocksdb.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:56)
at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:47)
at org.rocksdb.RocksDB.<clinit>(RocksDB.java:23)
at org.rocksdb.Options.<clinit>(Options.java:21)
at org.apache.kafka.streams.state.internals.RocksDBStore.<init>(RocksDBStore.java:127)
at org.apache.kafka.streams.state.internals.RocksDBStore.<init>(RocksDBStore.java:112)
at org.apache.kafka.streams.state.internals.RocksDBKeyValueStoreSupplier.get(RocksDBKeyValueStoreSupplier.java:56)
at org.apache.kafka.streams.processor.TopologyBuilder.build(TopologyBuilder.java:787)
at org.apache.kafka.streams.processor.TopologyBuilder.build(TopologyBuilder.java:761)
at org.apache.kafka.streams.processor.internals.StreamThread.createStreamTask(StreamThread.java:631)
at org.apache.kafka.streams.processor.internals.StreamThread.addStreamTasks(StreamThread.java:660)
at org.apache.kafka.streams.processor.internals.StreamThread.access$100(StreamThread.java:69)
at org.apache.kafka.streams.processor.internals.StreamThread$1.onPartitionsAssigned(StreamThread.java:124)
at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.onJoinComplete(ConsumerCoordinator.java:228)
at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:313)
at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:277)
at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:259)
at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1013)
at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:979)
at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:407)
at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:242)
答案 0 :(得分:0)
Windows尚未获得官方支持。
但是,Rocksdb 4.9.0+版本应该有一个Windows DLL版本,应该可以开箱即用。
对于旧版本,还有如下所述的解决方法:http://search-hadoop.com/m/Kafka/uyzND13pNzscClkW1?subj=Re+Kafka+Streams+on+Windows+
答案 1 :(得分:0)
从https://www.microsoft.com/en-us/download/details.aspx?id=48145安装vc_redist.x64有助于解决此问题。我在Windows10家庭版中遇到了同样的问题