Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-606

Hadoop tests fail on JDK9 - tools.jar not found

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      JDK 9

      Description

      As reported by Jörg Schaible

      > [ERROR] Failed to execute goal on project commons-vfs2: Could not resolve
      > dependencies for project org.apache.commons:commons-vfs2:jar:2.1: Could not
      > find artifact jdk.tools:jdk.tools:jar:1.6 at specified path /opt/oracle-jdk-
      > bin-1.9.0.0_beta116/../lib/tools.jar -> [Help 1]
      > [ERROR]
      > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
      > switch.
      > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      > [ERROR]
      > [ERROR] For more information about the errors and possible solutions, please
      > read the following articles:
      > [ERROR] [Help 1]
      > http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
      > [ERROR]
      > [ERROR] After correcting the problems, you can resume the build with the
      > command
      > [ERROR]   mvn <goals> -rf :commons-vfs2
      

      >
      > The reason is an invalid (transitive) system dependency on tools.jar of
      > Hadoop which is no longer present in Java 9.

      hadoop-common:test-jar pulls in:

      http://central.maven.org/maven2/org/apache/hadoop/hadoop-annotations/2.6.0/hadoop-annotations-2.6.0.pom

      With two different profiles, the os.linux profile activates for me as
      well, as the activation here is "Not a mac".

      The newer Hadoop 2.7.1 seems to have fixed to these activations.

      http://central.maven.org/maven2/org/apache/hadoop/hadoop-annotations/2.7.1/hadoop-annotations-2.7.1.pom

      (Hadoop 2.7 presumably no longer works on JDK6)

      We don't need the tools.jar for our test, so while upgrading to 2.7.1 would fix this - it would also mean we could no longer support JDK6. So I suggest adding an <exclusion> on tools.jar on our hadoop test dependency.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              stain Stian Soiland-Reyes
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: