Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-26477

Fix MiniMapReduceCluster failure under Java17

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0, 3.0.0-alpha-2
    • test
    • None
    • Reviewed

    Description

      MiniMapReduceCluster in HBaseTestingUtil.java will not work. Find the error message in the container log:

      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @755c9148
      	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
      	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
      	at java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[?:?]
      	at java.lang.reflect.Method.setAccessible(Method.java:193) ~[?:?]
      	at com.google.inject.internal.cglib.core.$ReflectUtils$2.run(ReflectUtils.java:56) ~[guice-4.0.jar:?]
      	at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?]
      	at com.google.inject.internal.cglib.core.$ReflectUtils.<clinit>(ReflectUtils.java:46) ~[guice-4.0.jar:?]
      

      The container of MiniMapReduceCluster is running in an independent JVM. So that we need to pass the JVM opts to the container JVM.
      Impacted UTs:
      TestSecureExportSnapshot
      TestMobSecureExportSnapshot
      TestVerifyReplicationCrossDiffHdfs

      Attachments

        Issue Links

          Activity

            People

              xytss123 Yutong Xiao
              xytss123 Yutong Xiao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: