Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-3243

Build fails on JDK 8 and 11

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0, 2.2.0
    • 3.0.0, 2.2.0
    • build-infra
    • None

    Description

      The build of current master branch fails - https://travis-ci.com/github/apache/ranger/builds/223139469

      There are several issues:
      Issue 1) org.apache.ranger.authorization.presto.authorizer.RangerSystemAccessControlFactory was not able to import com.google.common.base.Throwables.throwIfUnchecked because it was coming from an old copy of Guava's Throwables shaded in hive-exec.
      By replacing hive-exec with orc-core in agents-audit module all depending modules use their preferred version of Guava (26.0-jre)

      Issue 2) RangerSafenetKeySecure.java uses directly sun.security.pkcs11.SunPKCS11 - a class that is not available in Java 9+ and this breaks the compilation.
      This should use reflection to load SunPKCS11 class dynamically.

      Issue 3) JAXB is no more part of JDK 11+

      Issue 4) JUnit 4 Assert.assertThat() is deprecated in favour of Hamcrest's MatcherAssert.assertThat(). This fixes a compilation issue with JDK11.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mgrigorov Martin Tzvetanov Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m