Storm1.1.0+kafka0.10.2.1:NoSuchMethodError
本人刚刚开始使用storm和kafka,现想运行一个github上的开源项目:
github:cestella/streaming_outliers
但是因为这个程序是用storm0.10版本写的,而我的storm集群是1.0.3版本的,不能运行低版本的storm.所以修改了其程序,将storm版本换成了1.1.0版本,同时也更换了一些对storm有依赖的包对应的版本.
但是运行程序的时候,就出现了以下报错.
java.lang.NoSuchMethodError: org.apache.kafka.common.network.NetworkSend.<init>(Ljava/lang/String;Ljava/nio/ByteBuffer;)V at kafka.network.RequestOrResponseSend.<init>(RequestOrResponseSend.scala:41) at kafka.network.RequestOrResponseSend.<init>(RequestOrResponseSend.scala:44) at kafka.network.BlockingChannel.send(BlockingChannel.scala:112) at kafka.consumer.SimpleConsumer.liftedTree1$1(SimpleConsumer.scala:98) at kafka.consumer.SimpleConsumer.kafka$consumer$SimpleConsumer$$sendRequest(SimpleConsumer.scala:83) at kafka.consumer.SimpleConsumer.getOffsetsBefore(SimpleConsumer.scala:149) at kafka.javaapi.consumer.SimpleConsumer.getOffsetsBefore(SimpleConsumer.scala:79) at org.apache.storm.kafka.KafkaUtils.getOffset(KafkaUtils.java:75) at org.apache.storm.kafka.KafkaUtils.getOffset(KafkaUtils.java:65) at org.apache.storm.kafka.PartitionManager.<init>(PartitionManager.java:103) at org.apache.storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:98) at org.apache.storm.kafka.ZkCoordinator.getMyManagedPartitions(ZkCoordinator.java:69) at org.apache.storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:129) at org.apache.storm.daemon.executor$fn__4905$fn__4920$fn__4951.invoke(executor.clj:644) at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:484) at clojure.lang.AFn.run(AFn.java:22) at java.lang.Thread.run(Thread.java:745)
以及
java.lang.ExceptionInInitializerError at kafka.metrics.KafkaMetricsGroup$class.newTimer(KafkaMetricsGroup.scala:90) at kafka.consumer.FetchRequestAndResponseMetrics.newTimer(FetchRequestAndResponseStats.scala:26) at kafka.consumer.FetchRequestAndResponseMetrics.<init>(FetchRequestAndResponseStats.scala:35) at kafka.consumer.FetchRequestAndResponseStats.<init>(FetchRequestAndResponseStats.scala:47) at kafka.consumer.FetchRequestAndResponseStatsRegistry$$anonfun$2.apply(FetchRequestAndResponseStats.scala:60) at kafka.consumer.FetchRequestAndResponseStatsRegistry$$anonfun$2.apply(FetchRequestAndResponseStats.scala:60) at kafka.utils.Pool$$anonfun$getAndMaybePut$1.apply(Pool.scala:52) at kafka.utils.Pool.getAndMaybePut(Pool.scala:70) at kafka.utils.Pool.getAndMaybePut(Pool.scala:52) at kafka.consumer.FetchRequestAndResponseStatsRegistry$.getFetchRequestAndResponseStats(FetchRequestAndResponseStats.scala:64) at kafka.consumer.SimpleConsumer.<init>(SimpleConsumer.scala:44) at kafka.javaapi.consumer.SimpleConsumer.<init>(SimpleConsumer.scala:34) at org.apache.storm.kafka.DynamicPartitionConnections.register(DynamicPartitionConnections.java:60) at org.apache.storm.kafka.PartitionManager.<init>(PartitionManager.java:74) at org.apache.storm.kafka.ZkCoordinator.refresh(ZkCoordinator.java:98) at org.apache.storm.kafka.ZkCoordinator.getMyManagedPartitions(ZkCoordinator.java:69) at org.apache.storm.kafka.KafkaSpout.nextTuple(KafkaSpout.java:129) at org.apache.storm.daemon.executor$fn__4905$fn__4920$fn__4951.invoke(executor.clj:644) at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:484) at clojure.lang.AFn.run(AFn.java:22) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: Shutdown in progress at java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:66) at java.lang.Runtime.addShutdownHook(Runtime.java:211) at com.yammer.metrics.Metrics.<clinit>(Metrics.java:21) ... 21 more
以及
java.lang.NullPointerException at net.opentsdb.utils.Config.getBoolean(Config.java:354) ~[stormjar.jar:1.6.6] at net.opentsdb.utils.Config.loadStaticVariables(Config.java:620) ~[stormjar.jar:1.6.6] at net.opentsdb.utils.Config.setDefaults(Config.java:532) ~[stormjar.jar:1.6.6] at net.opentsdb.utils.Config.(Config.java:131) ~[stormjar.jar:1.6.6] at com.caseystella.analytics.timeseries.tsdb.TSDBHandler$TSDBConfig.(TSDBHandler.java:127) ~[stormjar.jar:1.6.6] at com.caseystella.analytics.timeseries.tsdb.TSDBHandler$TSDBConfig.(TSDBHandler.java:124) ~[stormjar.jar:1.6.6] at com.caseystella.analytics.timeseries.tsdb.TSDBHandler.configure(TSDBHandler.java:144) ~[stormjar.jar:1.6.6] at com.caseystella.analytics.outlier.OutlierBolt.prepare(OutlierBolt.java:63) ~[stormjar.jar:1.6.6] at org.apache.storm.daemon.executor$fn__4973$fn__4986.invoke(executor.clj:791) ~[storm-core-1.0.3.jar:1.0.3] at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:482) [storm-core-1.0.3.jar:1.0.3] java.lang.NullPointerException at net.opentsdb.utils.Config.getBoolean(Config.java:354) ~[stormjar.jar:1.6.6] at net.opentsdb.utils.Config.loadStaticVariables(Config.java:620) ~[stormjar.jar:1.6.6] at net.opentsdb.utils.Config.setDefaults(Config.java:532) ~[stormjar.jar:1.6.6] at net.opentsdb.utils.Config.(Config.java:131) ~[stormjar.jar:1.6.6] at com.caseystella.analytics.timeseries.tsdb.TSDBHandler$TSDBConfig.(TSDBHandler.java:127) ~[stormjar.jar:1.6.6] at com.caseystella.analytics.timeseries.tsdb.TSDBHandler$TSDBConfig.(TSDBHandler.java:124) ~[stormjar.jar:1.6.6] at com.caseystella.analytics.timeseries.tsdb.TSDBHandler.configure(TSDBHandler.java:144) ~[stormjar.jar:1.6.6] at com.caseystella.analytics.outlier.OutlierBolt.prepare(OutlierBolt.java:63) ~[stormjar.jar:1.6.6] at org.apache.storm.daemon.executor$fn__4973$fn__4986.invoke(executor.clj:791) ~[storm-core-1.0.3.jar:1.0.3] at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:482) [storm-core-1.0.3.jar:1.0.3]
对于第一个问题,网上有一个解决办法是增加kafka-clients依赖,但是我试过了,并没有用.我的jar包中找的到NetworkSend.class.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了吗?怎么解决的?