satanson opened a new pull request #503: reflection fails to access a private 
nested class
URL: https://github.com/apache/hbase/pull/503
 
 
   HMaster crashes at 
org/apache/hadoop/hbase/regionserver/HRegionServer.java:1044
   **A private static nested class can not be instantiated via reflection.**
   
   **code snippet**
   
   ```
         try {
           abortTimeoutTask =
               Class.forName(conf.get(ABORT_TIMEOUT_TASK, 
SystemExitWhenAbortTimeout.class.getName()))
                   
.asSubclass(TimerTask.class).getDeclaredConstructor().newInstance();
         } catch (Exception e) {
           LOG.warn("Initialize abort timeout task failed", e);
         }
   ```
   
   **log in product environtment**
   ```
   2019-08-16 18:01:40,737 [WARN ] HRegionServer:1046 Initialize abort timeout 
task failed
   java.lang.IllegalAccessException: Class 
org.apache.hadoop.hbase.regionserver.HRegionServer can not access a member of 
class org.apache.hadoop.hbase.regionss
        erver.HRegionServer$SystemExitWhenAbortTimeout with modifiers "private"
      at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
      at 
java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
      at 
java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:413)
      at 
org.apache.hadoop.hbase.regionserver.HRegionServer.run(HRegionServer.java:1044)
      at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:598)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to