添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Exception in thread “streaming-start” java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer 最新推荐文章于 2022-10-16 13:03:00 发布 lvtula 最新推荐文章于 2022-10-16 13:03:00 发布 阅读量2.8k Exception in thread “streaming-start” java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava/util/Collection;)V
<dependency>
  <groupId>org.apache.spark</groupId>
  <artifactId>spark-streaming-kafka-0-10_2.11</artifactId>
  <version>2.1.0.cloudera1</version>
</dependency>
Added the below jar: spark-streaming-kafka-0-10-assembly_2.11.jar Versions I'm using: Spark-2.0.2 Scala-2.11 Kafka-0.10 A piece of code:
val CLASS_NAME = this.getClass
val log = org.apache.log4j.LogManager.getLogger(CLASS_NAME)
Your help is highly appreciated. 解决办法:export SPARK_KAFKA_VERSION=0.10 https://stackoverflow.com/questions/45840824/exception-in-thread-streaming-start-java-lang-nosuchmethoderror-org-apache-ka Exception in thread “streaming-start” java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer Exception in thread “streaming-start” java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava/util/Collection;)VAsk QuestionWhen I submit the spark application... 赠送jar包:flink-streaming- _2.12-1.14.3.jar; 赠送原API文档:flink-streaming- _2.12-1.14.3- doc.jar; 赠送源代码:flink-streaming- _2.12-1.14.3-sources.jar; 赠送Maven依赖信息文件:flink-streaming- _2.12-1.14.3.pom; 包含翻译后的API文档:flink-streaming- _2.12-1.14.3- doc-API文档-中文(简体)版.zip; Maven坐标: apache .flink:flink-streaming- _2.12:1.14.3; apache 、flink、streaming、 、中文文档、jar包; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持不变,注释和说明精准翻译,请放心使用。 赠送jar包:flink-streaming- _2.11-1.13.2.jar; 赠送原API文档:flink-streaming- _2.11-1.13.2- doc.jar; 赠送源代码:flink-streaming- _2.11-1.13.2-sources.jar; 赠送Maven依赖信息文件:flink-streaming- _2.11-1.13.2.pom; 包含翻译后的API文档:flink-streaming- _2.11-1.13.2- doc-API文档-中文(简体)版.zip; Maven坐标: apache .flink:flink-streaming- _2.11:1.13.2; apache 、flink、streaming、 、中文文档、jar包; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的代码和结构保持不变,注释和说明精准翻译,请放心使用。 SLF4J: Failed to load class " .slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j. /codes.html#Stat... // Create DataFrame representing the stream of input lines from kafka val lines = spark.readStream .format(" kafka .option(" kafka .bootstrap.servers", " kafka 1:9092, kafka 2:9092, kafka 3:9092") .option("subscribe", ". scala:2.12.10 kafka :2.12-2.2.2 spark-streaming: apache .spark:spark-streaming- kafka -0-10_2.12-3.0.0.jar 使用spark-streaming连接 Kafka 并读取数据,出现如下错误: Exception thread streaming-start .NoClassDefFoundError: apache /spark/ka scalaVersion := "2.11.8" val sparkVersion = "2.2.0" libraryDependencies += " apache .spark" % "spark-core_2.11" % "2.2.0"// % Provided libraryDependenci... 参考文章: flume kafka sparkstreaming整合后集群报错 apache kafka clients consumer Kafka Consumer .subscribe(L https://blog.csdn.net/u010936936/article/details/77247075?locationNum=2&amp;fps=1    最近在... flink消费 kafka 上数据时报错: Caused by: NoSuchMethodError apache kafka clients consumer Kafka Consumer .assign(L /util/List;)V 错误原因: Flink的 kafka Consumer kafka -client的版本不一致 解决方案:三者版本一致 正确配... Kafka 对接Spark Streaming进行学习。 官方地址,但是需要注意的是: Kafka 项目在版本0.8和0.10之间引入了新的消费者API,因此有两个独立的相应Spark Streaming软件包可用。所以使用的时候要注意版本的问题。如下图所示版本选择: 作者使用版本介绍(伪分布式): kafka _2.11-0.10.0.1.tgz scala-2.11.8... 1、有这个类,该类没有这个方法 2、类冲突、Jar包冲突、Jar包版本冲突 3、有这个类(A),类中也有方法,但在B类中引用了A类,并调用A类的方法,后面修改A类,把该A类的方法返回值类型改变(如将方法返回类型由void类型改成String类型),只部署A类,没有重新部署B类,将导致 NoSuchMethodError 二、解决方案 1、有这个类,该类没有这个方法 在类增加方法。 2、类冲突、Jar包冲突、Jar包版本 使用IDEA工具运行SparkStreaming的WordCount时,运行报错,报错信息如下: Exception thread "main" NoSuchMethodError : scala.Predef$.refArrayOps([L /Object;)Lscala/collection/mutable/ArrayOps; apache .spark.util.Utils$.getCallSite(Utils.scala:1406) at or 运行环境:IntelliJ + scala + spark +hadoop 出错原因:IntelliJ 中的scala版本与Spark 自带的scala版本不同导致 我刚开始以为只要把IntelliJ 里的scala 版本配置与虚拟机配置的scala版本一致就行,后来发现不是这样,是要把IntelliJ 中的scala版本与Spark 自带的scala版本一致才行,不是虚拟机里的。 比如说,我虚拟机里配置的scala版本是2.13.3,而安装的Spark自带版本是2.12.10,IntelliJ 里的sca NoSuchMethodError apache .flink.streaming.connectors. kafka .Flink Kafka Consumer 玩足球的饭卡 Exception in thread “streaming-start” java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer 玩足球的饭卡 Jboss 7.1.1Final ---Could not register a EJB re...| JBoss.org Content Archive (Read Only)