java.lang.NoSuchMethodError: org.apache.spark.util.ThreadUtils$.newDae
-classpath "C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;F:\github1\Spark01\target\classes;F:\repository\org\scala-lang\scala-library\2.10.6\scala-library-2.10.6.jar;F:\repository\org\apache\spark\spark-core_2.10\1.6.1\spark-core_2.10-1.6.1.jar;F:\repository\org\apache\avro\avro-mapred\1.7.7\avro-mapred-1.7.7-hadoop2.jar;F:\repository\org\apache\avro\avro-ipc\1.7.7\avro-ipc-1.7.7.jar;F:\repository\org\apache\avro\avro-ipc\1.7.7\avro-ipc-1.7.7-tests.jar;F:\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar;F:\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar;F:\repository\com\twitter\chill_2.10\0.5.0\chill_2.10-0.5.0.jar;F:\repository\com\esotericsoftware\kryo\kryo\2.21\kryo-2.21.jar;F:\repository\com\esotericsoftware\reflectasm\reflectasm\1.07\reflectasm-1.07-shaded.jar;F:\repository\com\esotericsoftware\minlog\minlog\1.2\minlog-1.2.jar;F:\repository\org\objenesis\objenesis\1.2\objenesis-1.2.jar;F:\repository\com\twitter\chill-java\0.5.0\chill-java-0.5.0.jar;F:\repository\org\apache\xbean\xbean-asm5-shaded\4.4\xbean-asm5-shaded-4.4.jar;F:\repository\org\apache\spark\spark-launcher_2.10\1.6.1\spark-launcher_2.10-1.6.1.jar;F:\repository\org\apache\spark\spark-network-common_2.10\1.6.1\spark-network-common_2.10-1.6.1.jar;F:\repository\org\apache\spark\spark-network-shuffle_2.10\1.6.1\spark-network-shuffle_2.10-1.6.1.jar;F:\repository\org\fusesource\leveldbjni\leveldbjni-all\1.8\leveldbjni-all-1.8.jar;F:\repository\com\fasterxml\jackson\core\jackson-annotations\2.4.4\jackson-annotations-2.4.4.jar;F:\repository\org\apache\spark\spark-unsafe_2.10\1.6.1\spark-unsafe_2.10-1.6.1.jar;F:\repository\net\java\dev\jets3t\jets3t\0.7.1\jets3t-0.7.1.jar;F:\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar;F:\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;F:\repository\org\apache\curator\curator-recipes\2.4.0\curator-recipes-2.4.0.jar;F:\repository\org\apache\curator\curator-framework\2.4.0\curator-framework-2.4.0.jar;F:\repository\org\apache\zookeeper\zookeeper\3.4.5\zookeeper-3.4.5.jar;F:\repository\jline\jline\0.9.94\jline-0.9.94.jar;F:\repository\com\google\guava\guava\14.0.1\guava-14.0.1.jar;F:\repository\org\eclipse\jetty\orbit\javax.servlet\3.0.0.v201112011016\javax.servlet-3.0.0.v201112011016.jar;F:\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;F:\repository\org\apache\commons\commons-math3\3.4.1\commons-math3-3.4.1.jar;F:\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;F:\repository\org\slf4j\slf4j-api\1.7.10\slf4j-api-1.7.10.jar;F:\repository\org\slf4j\jul-to-slf4j\1.7.10\jul-to-slf4j-1.7.10.jar;F:\repository\org\slf4j\jcl-over-slf4j\1.7.10\jcl-over-slf4j-1.7.10.jar;F:\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;F:\repository\org\slf4j\slf4j-log4j12\1.7.10\slf4j-log4j12-1.7.10.jar;F:\repository\com\ning\compress-lzf\1.0.3\compress-lzf-1.0.3.jar;F:\repository\org\xerial\snappy\snappy-java\1.1.2\snappy-java-1.1.2.jar;F:\repository\net\jpountz\lz4\lz4\1.3.0\lz4-1.3.0.jar;F:\repository\org\roaringbitmap\RoaringBitmap\0.5.11\RoaringBitmap-0.5.11.jar;F:\repository\commons-net\commons-net\2.2\commons-net-2.2.jar;F:\repository\com\typesafe\akka\akka-remote_2.10\2.3.11\akka-remote_2.10-2.3.11.jar;F:\repository\com\typesafe\akka\akka-actor_2.10\2.3.11\akka-actor_2.10-2.3.11.jar;F:\repository\com\typesafe\config\1.2.1\config-1.2.1.jar;F:\repository\io\netty\netty\3.8.0.Final\netty-3.8.0.Final.jar;F:\repository\com\google\protobuf\protobuf-java\2.5.0\protobuf-java-2.5.0.jar;F:\repository\org\uncommons\maths\uncommons-maths\1.2.2a\uncommons-maths-1.2.2a.jar;F:\repository\com\typesafe\akka\akka-slf4j_2.10\2.3.11\akka-slf4j_2.10-2.3.11.jar;F:\repository\org\json4s\json4s-jackson_2.10\3.2.10\json4s-jackson_2.10-3.2.10.jar;F:\repository\org\json4s\json4s-core_2.10\3.2.10\json4s-core_2.10-3.2.10.jar;F:\repository\org\json4s\json4s-ast_2.10\3.2.10\json4s-ast_2.10-3.2.10.jar;F:\repository\org\scala-lang\scalap\2.10.0\scalap-2.10.0.jar;F:\repository\org\scala-lang\scala-compiler\2.10.0\scala-compiler-2.10.0.jar;F:\repository\com\sun\jersey\jersey-server\1.9\jersey-server-1.9.jar;F:\repository\asm\asm\3.1\asm-3.1.jar;F:\repository\com\sun\jersey\jersey-core\1.9\jersey-core-1.9.jar;F:\repository\org\apache\mesos\mesos\0.21.1\mesos-0.21.1-shaded-protobuf.jar;F:\repository\io\netty\netty-all\4.0.29.Final\netty-all-4.0.29.Final.jar;F:\repository\com\clearspring\analytics\stream\2.7.0\stream-2.7.0.jar;F:\repository\io\dropwizard\metrics\metrics-core\3.1.2\metrics-core-3.1.2.jar;F:\repository\io\dropwizard\metrics\metrics-jvm\3.1.2\metrics-jvm-3.1.2.jar;F:\repository\io\dropwizard\metrics\metrics-json\3.1.2\metrics-json-3.1.2.jar;F:\repository\io\dropwizard\metrics\metrics-graphite\3.1.2\metrics-graphite-3.1.2.jar;F:\repository\com\fasterxml\jackson\core\jackson-databind\2.4.4\jackson-databind-2.4.4.jar;F:\repository\com\fasterxml\jackson\core\jackson-core\2.4.4\jackson-core-2.4.4.jar;F:\repository\com\fasterxml\jackson\module\jackson-module-scala_2.10\2.4.4\jackson-module-scala_2.10-2.4.4.jar;F:\repository\org\scala-lang\scala-reflect\2.10.4\scala-reflect-2.10.4.jar;F:\repository\com\thoughtworks\paranamer\paranamer\2.6\paranamer-2.6.jar;F:\repository\org\apache\ivy\ivy\2.4.0\ivy-2.4.0.jar;F:\repository\oro\oro\2.0.8\oro-2.0.8.jar;F:\repository\org\tachyonproject\tachyon-client\0.8.2\tachyon-client-0.8.2.jar;F:\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;F:\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;F:\repository\org\tachyonproject\tachyon-underfs-hdfs\0.8.2\tachyon-underfs-hdfs-0.8.2.jar;F:\repository\org\tachyonproject\tachyon-underfs-s3\0.8.2\tachyon-underfs-s3-0.8.2.jar;F:\repository\org\tachyonproject\tachyon-underfs-local\0.8.2\tachyon-underfs-local-0.8.2.jar;F:\repository\net\razorvine\pyrolite\4.9\pyrolite-4.9.jar;F:\repository\net\sf\py4j\py4j\0.9\py4j-0.9.jar;F:\repository\org\spark-project\spark\unused\1.0.0\unused-1.0.0.jar;F:\repository\org\apache\hadoop\hadoop-client\2.6.4\hadoop-client-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-common\2.6.4\hadoop-common-2.6.4.jar;F:\repository\commons-cli\commons-cli\1.2\commons-cli-1.2.jar;F:\repository\xmlenc\xmlenc\0.52\xmlenc-0.52.jar;F:\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;F:\repository\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;F:\repository\commons-configuration\commons-configuration\1.6\commons-configuration-1.6.jar;F:\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;F:\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;F:\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar;F:\repository\org\apache\avro\avro\1.7.4\avro-1.7.4.jar;F:\repository\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;F:\repository\org\apache\hadoop\hadoop-auth\2.6.4\hadoop-auth-2.6.4.jar;F:\repository\org\apache\httpcomponents\httpclient\4.2.5\httpclient-4.2.5.jar;F:\repository\org\apache\httpcomponents\httpcore\4.2.4\httpcore-4.2.4.jar;F:\repository\org\apache\directory\server\apacheds-kerberos-codec\2.0.0-M15\apacheds-kerberos-codec-2.0.0-M15.jar;F:\repository\org\apache\directory\server\apacheds-i18n\2.0.0-M15\apacheds-i18n-2.0.0-M15.jar;F:\repository\org\apache\directory\api\api-asn1-api\1.0.0-M20\api-asn1-api-1.0.0-M20.jar;F:\repository\org\apache\directory\api\api-util\1.0.0-M20\api-util-1.0.0-M20.jar;F:\repository\org\apache\curator\curator-client\2.6.0\curator-client-2.6.0.jar;F:\repository\org\htrace\htrace-core\3.0.4\htrace-core-3.0.4.jar;F:\repository\org\apache\commons\commons-compress\1.4.1\commons-compress-1.4.1.jar;F:\repository\org\tukaani\xz\1.0\xz-1.0.jar;F:\repository\org\apache\hadoop\hadoop-hdfs\2.6.4\hadoop-hdfs-2.6.4.jar;F:\repository\org\mortbay\jetty\jetty-util\6.1.26\jetty-util-6.1.26.jar;F:\repository\xerces\xercesImpl\2.9.1\xercesImpl-2.9.1.jar;F:\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar;F:\repository\org\apache\hadoop\hadoop-mapreduce-client-app\2.6.4\hadoop-mapreduce-client-app-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-mapreduce-client-common\2.6.4\hadoop-mapreduce-client-common-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-yarn-client\2.6.4\hadoop-yarn-client-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-yarn-server-common\2.6.4\hadoop-yarn-server-common-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-mapreduce-client-shuffle\2.6.4\hadoop-mapreduce-client-shuffle-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-yarn-api\2.6.4\hadoop-yarn-api-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-mapreduce-client-core\2.6.4\hadoop-mapreduce-client-core-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-yarn-common\2.6.4\hadoop-yarn-common-2.6.4.jar;F:\repository\javax\xml\bind\jaxb-api\2.2.2\jaxb-api-2.2.2.jar;F:\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;F:\repository\javax\activation\activation\1.1\activation-1.1.jar;F:\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;F:\repository\com\sun\jersey\jersey-client\1.9\jersey-client-1.9.jar;F:\repository\org\codehaus\jackson\jackson-jaxrs\1.9.13\jackson-jaxrs-1.9.13.jar;F:\repository\org\codehaus\jackson\jackson-xc\1.9.13\jackson-xc-1.9.13.jar;F:\repository\org\apache\hadoop\hadoop-mapreduce-client-jobclient\2.6.4\hadoop-mapreduce-client-jobclient-2.6.4.jar;F:\repository\org\apache\hadoop\hadoop-annotations\2.6.4\hadoop-annotations-2.6.4.jar;F:\repository\org\apache\spark\spark-sql_2.10\1.6.1\spark-sql_2.10-1.6.1.jar;F:\repository\org\apache\spark\spark-catalyst_2.10\1.6.1\spark-catalyst_2.10-1.6.1.jar;F:\repository\org\codehaus\janino\janino\2.7.8\janino-2.7.8.jar;F:\repository\org\codehaus\janino\commons-compiler\2.7.8\commons-compiler-2.7.8.jar;F:\repository\org\apache\parquet\parquet-column\1.7.0\parquet-column-1.7.0.jar;F:\repository\org\apache\parquet\parquet-common\1.7.0\parquet-common-1.7.0.jar;F:\repository\org\apache\parquet\parquet-encoding\1.7.0\parquet-encoding-1.7.0.jar;F:\repository\org\apache\parquet\parquet-generator\1.7.0\parquet-generator-1.7.0.jar;F:\repository\org\apache\parquet\parquet-hadoop\1.7.0\parquet-hadoop-1.7.0.jar;F:\repository\org\apache\parquet\parquet-format\2.3.0-incubating\parquet-format-2.3.0-incubating.jar;F:\repository\org\apache\parquet\parquet-jackson\1.7.0\parquet-jackson-1.7.0.jar;F:\repository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar;F:\repository\org\apache\spark\spark-streaming_2.10\1.5.2\spark-streaming_2.10-1.5.2.jar" day4.StreamingWordCount Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties // :: INFO LoggerLevels: Setting log level to [WARN] for streaming example. To override add a custom log4j.properties to the classpath. // :: ERROR Executor: Exception ) java.lang.NoSuchMethodError: org.apache.spark.util.ThreadUtils$.newDaemonCachedThreadPool(Ljava/lang/String;I)Ljava/util/concurrent/ThreadPoolExecutor; at org.apache.spark.streaming.receiver.ReceiverSupervisor.<init>(ReceiverSupervisor.scala:) at org.apache.spark.streaming.receiver.ReceiverSupervisorImpl.<init>(ReceiverSupervisorImpl.scala:) at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$.apply(ReceiverTracker.scala:) at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$.apply(ReceiverTracker.scala:) at org.apache.spark.SparkContext$$anonfun$.apply(SparkContext.scala:) at org.apache.spark.SparkContext$$anonfun$.apply(SparkContext.scala:) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:) at org.apache.spark.scheduler.Task.run(Task.scala:) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:) at java.lang.Thread.run(Thread.java:) // :: ERROR SparkUncaughtExceptionHandler: Uncaught exception ,,main] java.lang.NoSuchMethodError: org.apache.spark.util.ThreadUtils$.newDaemonCachedThreadPool(Ljava/lang/String;I)Ljava/util/concurrent/ThreadPoolExecutor; at org.apache.spark.streaming.receiver.ReceiverSupervisor.<init>(ReceiverSupervisor.scala:) at org.apache.spark.streaming.receiver.ReceiverSupervisorImpl.<init>(ReceiverSupervisorImpl.scala:) at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$.apply(ReceiverTracker.scala:) at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$.apply(ReceiverTracker.scala:) at org.apache.spark.SparkContext$$anonfun$.apply(SparkContext.scala:) at org.apache.spark.SparkContext$$anonfun$.apply(SparkContext.scala:) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:) at org.apache.spark.scheduler.Task.run(Task.scala:) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:) at java.lang.Thread.run(Thread.java:) // :: WARN TaskSetManager: Lost task , localhost): java.lang.NoSuchMethodError: org.apache.spark.util.ThreadUtils$.newDaemonCachedThreadPool(Ljava/lang/String;I)Ljava/util/concurrent/ThreadPoolExecutor; at org.apache.spark.streaming.receiver.ReceiverSupervisor.<init>(ReceiverSupervisor.scala:) at org.apache.spark.streaming.receiver.ReceiverSupervisorImpl.<init>(ReceiverSupervisorImpl.scala:) at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$.apply(ReceiverTracker.scala:) at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$.apply(ReceiverTracker.scala:) at org.apache.spark.SparkContext$$anonfun$.apply(SparkContext.scala:) at org.apache.spark.SparkContext$$anonfun$.apply(SparkContext.scala:) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:) at org.apache.spark.scheduler.Task.run(Task.scala:) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:) at java.lang.Thread.run(Thread.java:) // :: ERROR TaskSetManager: Task times; aborting job Process finished with exit code
在写sparkStreaming 的时候遇到了依赖的SparkStreaming版本和SparkCore的版本不一致的问题 报错
以前的 pom.xml文件如下:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.bianqi.spark.demo</groupId> <artifactId>Spark01</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <properties> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <encoding>UTF-8</encoding> <scala.version>2.10.6</scala.version> <spark.version>1.6.1</spark.version> <hadoop.version>2.6.4</hadoop.version> </properties> <dependencies> <dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-library</artifactId> <version>${scala.version}</version> </dependency> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-core_2.10</artifactId> <version>${spark.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>${hadoop.version}</version> </dependency> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-sql_2.10</artifactId> <version>${spark.version}</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.38</version> </dependency> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-streaming_2.10</artifactId> <version>1.5.2</version> </dependency> </dependencies> <build> <sourceDirectory>src/main/scala</sourceDirectory> <testSourceDirectory>src/test/scala</testSourceDirectory> <plugins> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>3.2.2</version> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> <configuration> <args> <arg>-make:transitive</arg> <arg>-dependencyfile</arg> <arg>${project.build.directory}/.scala_dependencies</arg> </args> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
可以看到 sparkStreaming 和SparkCore的版本不一样 导致了 如上错误
修复方案: 修改pom.xml中的SparkStreaming的版本 如下图: 正常 运行 !
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.bianqi.spark.demo</groupId> <artifactId>Spark01</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <properties> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <encoding>UTF-8</encoding> <scala.version>2.10.6</scala.version> <spark.version>1.6.1</spark.version> <hadoop.version>2.6.4</hadoop.version> </properties> <dependencies> <dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-library</artifactId> <version>${scala.version}</version> </dependency> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-core_2.10</artifactId> <version>${spark.version}</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>${hadoop.version}</version> </dependency> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-sql_2.10</artifactId> <version>${spark.version}</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.38</version> </dependency> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-streaming_2.10</artifactId> <version>${spark.version}</version> </dependency> </dependencies> <build> <sourceDirectory>src/main/scala</sourceDirectory> <testSourceDirectory>src/test/scala</testSourceDirectory> <plugins> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>3.2.2</version> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> <configuration> <args> <arg>-make:transitive</arg> <arg>-dependencyfile</arg> <arg>${project.build.directory}/.scala_dependencies</arg> </args> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
控制台代码正常 运行:
记录一下 方便 以后 再 踩坑!
java.lang.NoSuchMethodError: org.apache.spark.util.ThreadUtils$.newDae的更多相关文章
- java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringManager.getManager(Ljava/lang/Class;)Lorg/apache/tomcat/util/res/StringManager
问题: 使用Springboot打包为war部署于Tomcat7中报错 java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringMa ...
- Tomcat启动失败:java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringManager.getManager(Ljava/lang/Class;)Lorg/apache/tomcat/util/res/StringManager
项目开发中发现服务器上Tomcat启动失败 开始定位 第一步:打开tomcat日志catalina.log: 2017-07-25 17:02:43,799 [Catalina-startStop-1 ...
- java.lang.NoSuchMethodError: org.apache.spark.internal.Logging.$init$(Lorg/apache/spark/internal/Logging;)V
1.sparkML的版本不对应 请参考官网找到对于版本, 比如我的 spark2.3.3 spark MLlib 也是2.3.3
- CDH下集成spark2.2.0与kafka(四十一):在spark+kafka流处理程序中抛出错误java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava/util/Collection;)V
错误信息 19/01/15 19:36:40 WARN consumer.ConsumerConfig: The configuration max.poll.records = 1 was supp ...
- java.lang.NoSuchMethodError: org.apache.tomcat.JarScanner.scan(Ljavax/servlet/ServletContext;Ljava/lang/ClassLoader;Lorg/apache/tomcat/JarScannerCallback;Ljava/util/Set;)V
java.lang.NoSuchMethodError: org.apache.tomcat.JarScanner.scan(Ljavax/servlet/ServletContext;Ljava/l ...
- Cloudera集群中提交Spark任务出现java.lang.NoSuchMethodError: org.apache.hadoop.hbase.HTableDescriptor.addFamily错误解决
Cloudera及相关的组件版本 Cloudera: 5.7.0 Hbase: 1.20 Hadoop: 2.6.0 ZooKeeper: 3.4.5 就算是引用了相应的组件依赖,依然是报一样的错误! ...
- 转:Caused by: java.lang.NoSuchMethodError: org.apache.log4j.Category.log
Caused by: java.lang.NoSuchMethodError: org.apache.log4j.Category.log出现的异常:java.lang.reflect.Invocat ...
- 异常:java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Workbook.getCellStyleAt
背景 最近公司所有新项目要使用最新高效快速开发框架nature-framework,框架本身结合NatureMap已经集成excel的高效导入功能,我们要实现高性能的导出功能,因为最新的jxls-2. ...
- java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCrc32.nativeComputeChunkedSumsByteArray(II[BI[BIILjava/lang/String;JZ)V
环境: Spark2.1.0 .Hadoop-2.7.5 代码运行系统:Win 7在运行Spark程序写出文件(savaAsTextFile)的时候,我遇到了这个错误: // :: ERROR U ...
随机推荐
- [Python爬虫] 之十六:Selenium +phantomjs 利用 pyquery抓取一点咨询数据
本篇主要是利用 pyquery来定位抓取数据,而不用xpath,通过和xpath比较,pyquery效率要高. 主要代码: # coding=utf-8 import os import re fro ...
- 小白系列-免费广告路由器web认证设置(2)
要设置认证页面图片.须要到后台注冊一个帐号,绑定路由器. 路由器管理后台网址 http://115.29.12.130/router 第一步:自己主动获取一个路由器ID(上一篇文章中的路由器ID也要改 ...
- 算法笔记_087:蓝桥杯练习 9-1九宫格(Java)
目录 1 问题描述 2 解决方案 1 问题描述 问题描述 九宫格.输入1-9这9个数字的一种任意排序,构成3*3二维数组.如果每行.每列以及对角线之和都相等,打印1.否则打印0. 样例输出 与上面 ...
- selenium获取html源代码
# 执行js得到整个HTML html = driver.execute_script("return document.documentElement.outerHTML") 获 ...
- php使用curl请求数据(采集数据)
<?php $url = "http://www.baidu.com/s?wd=刘俊涛的博客"; $header = array( 'User-Agent: Mozilla/ ...
- QueryRunner
在相继学习了JDBC和数据库操作之后,我们明显感到编写JDBC代码并非一件轻松的事儿.为了帮助我们更高效的学习工作,从JDBC的繁重代码中解脱出来,xx给我们详尽介绍了一个简化JDBC操作的组件——D ...
- IOS Exception 1(libc++abi.dylib: terminating with uncaught exception of type NSException)
2014-08-05 22:18:46.455 SwiftUI[1329:40871] -[_TtC7SwiftUI14MViewControler clickMe]: unrecognized se ...
- LoadRunner+Android模所器实现抓包并调试本地服务端
步骤就是 1:新建LR脚本.协议选择Mobile Application - HTTP/HTML 2:在record里选择第三个:Record Emulator........ 3: 选择下一步后, ...
- C++之声明与定义的区别
直接举例,在C++中,声明与定义的区别如下: extern int a;//若有extern关键字,则只是声明 int b;//若没有extern关键字,则为声明+定义 int a;//若之前已经声明 ...
- 将Cmder添加到系统右键菜单中
1.把 Cmder 加到环境变量 把Cmder.exe存放的目录添加到系统环境变量: 加完之后,Win+r一下输入cmder,即可. 2.添加 cmder 到右键菜单:环境变量添加后,在任意文件夹中即 ...