Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-4409

class conflict between jsr305-1.3.9.jar and flink-shaded-hadoop2-1.1.1.jar

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0, 1.1.2
    • Component/s: Build System
    • Labels:
      None

      Description

      It seems all classes in jsr305-1.3.9.jar can be found in flink-shaded-hadoop2-1.1.1.jar,too.
      I can exclude these jars for a success assembly and run when I was using sbt

      libraryDependencies ++= Seq(
        "com.typesafe.play" %% "play-json" % "2.3.8",
        "org.apache.flink" %% "flink-scala" % "1.1.1"
          exclude("com.google.code.findbugs", "jsr305"),
        "org.apache.flink" %% "flink-connector-kafka-0.8" % "1.1.1"
          exclude("com.google.code.findbugs", "jsr305"),
        "org.apache.flink" %% "flink-streaming-scala" % "1.1.1"
          exclude("com.google.code.findbugs", "jsr305"),
        "org.apache.flink" %% "flink-clients" % "1.1.1"
          exclude("com.google.code.findbugs", "jsr305"),
        "joda-time" % "joda-time" % "2.9.4",
        "org.scalikejdbc" %% "scalikejdbc" % "2.2.7",
        "mysql" % "mysql-connector-java" % "5.1.15",
        "io.spray" %% "spray-caching" % "1.3.3"
      )
      

      But I think it might be better to remove jsr305 dependency from Flink.

        Issue Links

          Activity

          Hide
          StephanEwen Stephan Ewen added a comment -

          We want to make Flink independent of Hadoop, so I would exclude them from the Hadoop2 dependency.

          Show
          StephanEwen Stephan Ewen added a comment - We want to make Flink independent of Hadoop, so I would exclude them from the Hadoop2 dependency.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user StephanEwen opened a pull request:

          https://github.com/apache/flink/pull/2378

          FLINK-4409 [build] Exclude JSR 305 from Hadoop dependencies

          The JSR 305 classes (`javax.annotation`) are already in Flink's core dependencies.

          I verified that after this patch, the classes are no longer in the Hadoop jar files.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/StephanEwen/incubator-flink jsr_hadoop

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/2378.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #2378


          commit 3f1e1f92f2138877a4e1e0a187638cdb30de0865
          Author: Stephan Ewen <sewen@apache.org>
          Date: 2016-08-17T09:53:57Z

          FLINK-4409 [build] Exclude JSR 305 from Hadoop dependencies


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user StephanEwen opened a pull request: https://github.com/apache/flink/pull/2378 FLINK-4409 [build] Exclude JSR 305 from Hadoop dependencies The JSR 305 classes (`javax.annotation`) are already in Flink's core dependencies. I verified that after this patch, the classes are no longer in the Hadoop jar files. You can merge this pull request into a Git repository by running: $ git pull https://github.com/StephanEwen/incubator-flink jsr_hadoop Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2378.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2378 commit 3f1e1f92f2138877a4e1e0a187638cdb30de0865 Author: Stephan Ewen <sewen@apache.org> Date: 2016-08-17T09:53:57Z FLINK-4409 [build] Exclude JSR 305 from Hadoop dependencies
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

          https://github.com/apache/flink/pull/2378

          @rmetzger If you are okay with this, I'd merge it to 1.2.0 and 1.1.2

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2378 @rmetzger If you are okay with this, I'd merge it to 1.2.0 and 1.1.2
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/2378

          +1 to merge

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/2378 +1 to merge
          Hide
          StephanEwen Stephan Ewen added a comment -

          Fixed in

          • 1.2.0 via c894896a45f895997567d5c4e86f9ca25e542e52
          • 1.1.2 via 54cccb852f2d4d9f46f6ed8eb635662d6a122a99
          Show
          StephanEwen Stephan Ewen added a comment - Fixed in 1.2.0 via c894896a45f895997567d5c4e86f9ca25e542e52 1.1.2 via 54cccb852f2d4d9f46f6ed8eb635662d6a122a99
          Hide
          StephanEwen Stephan Ewen added a comment -

          Renkai Ge I have pushed the fix into the 1.2-SNAPSHOT and 1.1-SNAPSHOT branches.
          Give it a bit to be published to maven (the build bot takes some hours). Would be cool if you could let me know how it works for you.

          Show
          StephanEwen Stephan Ewen added a comment - Renkai Ge I have pushed the fix into the 1.2-SNAPSHOT and 1.1-SNAPSHOT branches. Give it a bit to be published to maven (the build bot takes some hours). Would be cool if you could let me know how it works for you.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

          https://github.com/apache/flink/pull/2378

          Manually merged in c894896a45f895997567d5c4e86f9ca25e542e52

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2378 Manually merged in c894896a45f895997567d5c4e86f9ca25e542e52
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen closed the pull request at:

          https://github.com/apache/flink/pull/2378

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen closed the pull request at: https://github.com/apache/flink/pull/2378

            People

            • Assignee:
              StephanEwen Stephan Ewen
              Reporter:
              RenkaiGe Renkai Ge
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development