Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-7741

Bad dependency via SBT

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.0.1, 2.1.0
    • Fix Version/s: 2.2.0, 2.1.1, 2.0.2
    • Component/s: streams
    • Labels:
      None
    • Environment:
      Windows 10 professional, IntelliJ IDEA 2017.1

      Description

      I am using the Kafka-Streams-Scala 2.1.0 JAR.

      And if I create a new Scala project using SBT with these dependencies 

      name := "ScalaKafkaStreamsDemo"
      
      version := "1.0"
      
      scalaVersion := "2.12.1"
      
      libraryDependencies += "org.apache.kafka" %% "kafka" % "2.0.0"
      libraryDependencies += "org.apache.kafka" % "kafka-clients" % "2.0.0"
      libraryDependencies += "org.apache.kafka" % "kafka-streams" % "2.0.0"
      libraryDependencies += "org.apache.kafka" %% "kafka-streams-scala" % "2.0.0"
      
      //TEST
      libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % Test
      libraryDependencies += "org.apache.kafka" % "kafka-streams-test-utils" % "2.0.0" % Test
      

      I get this error

       

      SBT 'ScalaKafkaStreamsDemo' project refresh failed
      Error:Error while importing SBT project:<br/>...<br/><pre>[info] Resolving jline#jline;2.14.1 ...
      [warn] [FAILED ] javax.ws.rs#javax.ws.rs-api;2.1.1!javax.ws.rs-api.${packaging.type}: (0ms)
      [warn] ==== local: tried
      [warn] C:\Users\sacha\.ivy2\local\javax.ws.rs\javax.ws.rs-api\2.1.1\${packaging.type}s\javax.ws.rs-api.${packaging.type}
      [warn] ==== public: tried
      [warn] https://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.${packaging.type}
      [info] downloading https://repo1.maven.org/maven2/org/apache/kafka/kafka-streams-test-utils/2.1.0/kafka-streams-test-utils-2.1.0.jar ...
      [info] [SUCCESSFUL ] org.apache.kafka#kafka-streams-test-utils;2.1.0!kafka-streams-test-utils.jar (344ms)
      [warn] ::::::::::::::::::::::::::::::::::::::::::::::
      [warn] :: FAILED DOWNLOADS ::
      [warn] :: ^ see resolution messages for details ^ ::
      [warn] ::::::::::::::::::::::::::::::::::::::::::::::
      [warn] :: javax.ws.rs#javax.ws.rs-api;2.1.1!javax.ws.rs-api.${packaging.type}
      [warn] ::::::::::::::::::::::::::::::::::::::::::::::
      [trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
      [trace] Stack trace suppressed: run 'last *:update' for the full output.
      [error] (*:ssExtractDependencies) sbt.ResolveException: download failed: javax.ws.rs#javax.ws.rs-api;2.1.1!javax.ws.rs-api.${packaging.type}
      [error] (*:update) sbt.ResolveException: download failed: javax.ws.rs#javax.ws.rs-api;2.1.1!javax.ws.rs-api.${packaging.type}
      [error] Total time: 8 s, completed 16-Dec-2018 19:27:21
      Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0</pre><br/>See complete log in <a href="file:/C:/Users/sacha/.IdeaIC2017.1/system/log/sbt.last.log">file:/C:/Users/sacha/.IdeaIC2017.1/system/log/sbt.last.log</a>
      

      This seems to be a common issue with bad dependency from Kafka to javax.ws.rs-api.

      if I drop the Kafka version down to 2.0.0 and add this line to my SBT file this error goes away

      libraryDependencies += "javax.ws.rs" % "javax.ws.rs-api" % "2.1" artifacts(Artifact("javax.ws.rs-api", "jar", "jar"))`
      

       

      However I would like to work with 2.1.0 version.

       

       

        Attachments

          Activity

            People

            • Assignee:
              vvcephei John Roesler
              Reporter:
              sachabarber sacha barber
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: