Apache Flink RabbitMq SBT依赖失败


0

我正在尝试使用Flink与RabbitMq流 join器。尝试了所有可能的版本组合,但仍然失败。

这是我的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] 

1 答案


0

您是否尝试过使用相同的Flink依赖项版本进行构建?我使用以下sbt配置成功完成了构建(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Šu apiŠu quickstart.htmlŠsbt).


我来回答

写文章

提问题

面试题