gpt4 book ai didi

serialization - Spark com.fasterxml.jackson.module 错误

转载 作者:行者123 更新时间:2023-12-03 22:53:21 42 4
gpt4 key购买 nike

这有点奇怪。运行时很简单sparkContext.parallelize(List("1","2","3"))
我收到以下错误:

java.lang.VerifyError: class com.fasterxml.jackson.module.scala.ser.ScalaIteratorSerializer overrides final method withResolved.(Lcom/fasterxml/jackson/databind/BeanProperty;Lcom/fasterxml/jackson/databind/jsontype/TypeSerializer;Lcom/fasterxml/jackson/databind/JsonSerializer;)Lcom/fasterxml/jackson/databind/ser/std/AsArraySerializerBase;

我想某些库的依赖项存在一些冲突。我的 build.sbt 看起来像这样:
scalaVersion := "2.11.7"

//Library repositories
resolvers ++= Seq(
Resolver.mavenLocal,
"Scala-Tools Maven2 Repository" at "http://scala-tools.org/repo-releases",
"Java.net repository" at "http://download.java.net/maven/2",
"GeoTools" at "http://download.osgeo.org/webdav/geotools",
"Apache" at "https://repository.apache.org/service/local/repositories/releases/content",
"Cloudera" at "https://repository.cloudera.com/artifactory/cloudera-repos/",
"OpenGeo Maven Repository" at "http://repo.opengeo.org",
"Typesafe" at "https://repo.typesafe.com/typesafe/releases/",
"Spray Repository" at "http://repo.spray.io"
)

//Library versions
val geotools_version = "13.2"
val accumulo_version = "1.6.0-cdh5.1.4"
val hadoop_version = "2.6.0-cdh5.4.5"
val hadoop_client_version = "2.6.0-mr1-cdh5.4.5"
val geowave_version = "0.9.0-SNAPSHOT"
val akka_version = "2.4.0"
val spray_version = "1.3.3"
val spark_version = "1.5.0"

//Library Dependencies
libraryDependencies ++= Seq(
//Scala
"org.scala-lang" % "scala-library" % scalaVersion.value,
"org.scala-lang" % "scala-reflect" % scalaVersion.value,

//GeoTools
"org.geotools" % "gt-data" % geotools_version,
"org.geotools" % "gt-geojson" % geotools_version,

//Apache
"org.apache.accumulo" % "accumulo-core" % accumulo_version,
"org.apache.hadoop" % "hadoop-common" % hadoop_version,
"org.apache.hadoop" % "hadoop-client" % hadoop_client_version,

//Geowave
"mil.nga.giat" % "geowave-core-store" % geowave_version,
"mil.nga.giat" % "geowave-datastore-accumulo" % geowave_version,
"mil.nga.giat" % "geowave-adapter-vector" % geowave_version,

//Other
"com.typesafe" % "config" % "1.3.0",

//Spray - Akka
"com.typesafe.akka" %% "akka-actor" % akka_version,

"io.spray" %% "spray-can" % spray_version,
"io.spray" %% "spray-routing" % spray_version,
"io.spray" %% "spray-testkit" % spray_version % "test",

//Spark
"org.apache.spark" %% "spark-core" % spark_version,

"com.typesafe.play" %% "play-json" % "2.5.0-M1",

//Testing
"org.scalatest" % "scalatest_2.11" % "2.2.4" % "test"
).map(
_.excludeAll(ExclusionRule(organization = "org.mortbay.jetty"))
)

test in assembly := {}

关于在哪里看的任何指示?

谢谢

最佳答案

Spring Boot 1.3.1 + Apache Spark 1.6.0 问题通过添加依赖解决:

    <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.4</version>
</dependency>

不排除任何其他所需的依赖项。

关于serialization - Spark com.fasterxml.jackson.module 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33815396/

42 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com