apache flink rabbitmq sbt依赖失败

a8jjtwal  于 2021-06-25  发布在  Flink
关注(0)|答案(1)|浏览(417)

我正在尝试使用flink与rabbitmq流连接器。尝试了所有可能的版本组合,但仍然失败。
这是我的sbt构建片段

scalaVersion in ThisBuild := "2.11.7"

val flinkVersion = "1.0.0"

val json4sNative = "org.json4s" %% "json4s-native" % "3.3.0"

val flinkDependencies = Seq(
  "org.apache.flink" %% "flink-scala" % flinkVersion % "provided",
  "org.apache.flink" %% "flink-streaming-scala" % flinkVersion %     "provided",
  "org.apache.flink" %% "flink-connector-rabbitmq" % "0.10.1",
  json4sNative)

错误片段

[error] (root/*:assembly) deduplicate: different file contents found in the following:
[error] /Users/gopigrip7/.ivy2/cache/javax.xml.stream/stax-api/jars/stax-api-1.0-2.jar:javax/xml/stream/EventFilter.class
[error] /Users/gopigrip7/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:javax/xml/stream/EventFilter.class
[error] deduplicate: different file contents found in the following:
[error] /Users/gopigrip7/.ivy2/cache/javax.xml.stream/stax-api/jars/stax-api-1.0-2.jar:javax/xml/stream/FactoryConfigurationError.class
[error] /Users/gopigrip7/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:javax/xml/stream/FactoryConfigurationError.class
[error] deduplicate: different file contents found in the following:
[error] /Users/gopigrip7/.ivy2/cache/javax.xml.stream/stax-api/jars/stax-api-1.0-2.jar:javax/xml/stream/FactoryFinder$1.class
[error] /Users/gopigrip7/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:javax/xml/stream/FactoryFinder$1.class
[error] deduplicate: different file contents found in the following:
[error] /Users/gopigrip7/.ivy2/cache/javax.xml.stream/stax-api/jars/stax-api-1.0-2.jar:javax/xml/stream/FactoryFinder$ClassLoaderFinder.class
[error] /Users/gopigrip7/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:javax/xml/stream/FactoryFinder$ClassLoaderFinder.class
[error] deduplicate: different file contents found in the following:
[error] /Users/gopigrip7/.ivy2/cache/javax.xml.stream/stax-api/jars/stax-api-1.0-2.jar:javax/xml/stream/FactoryFinder$ClassLoaderFinderConcrete.class
[error] /Users/gopigrip7/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:javax/xml/stream/FactoryFinder$ClassLoaderFinderConcrete.class
[error] deduplicate: different file contents found in the following:
[error] /Users/gopigrip7/.ivy2/cache/javax.xml.stream/stax-api/jars/stax-api-1.0-2.jar:javax/xml/stream/FactoryFinder.class
[error] /Users/gopigrip7/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:javax/xml/stream/FactoryFinder.class
[error] deduplicate: different file contents found in the following:
[error]
cig3rfwq

cig3rfwq1#

您是否尝试过使用相同的flink依赖项版本进行构建?我成功地完成了建造( sbt assembly )具有以下sbt配置:

name := "flink-sbt-sample"

version := "1.0"

scalaVersion := "2.11.7"

val flinkVersion = "1.0.0"

libraryDependencies ++= Seq(
  "org.apache.flink" %% "flink-scala" % flinkVersion % "provided",
  "org.apache.flink" %% "flink-streaming-scala" % flinkVersion % "provided",
  "org.apache.flink" %% "flink-connector-rabbitmq" % flinkVersion,
  "org.json4s" %% "json4s-native" % "3.3.0"
)

请注意,有一个使用sbt的flink项目指南(https://ci.apache.org/projects/flink/flink-docs-master/quickstart/scala_api_quickstart.html#sbt).

相关问题