Darrel Schneider created GEODE-9475:
---------------------------------------

             Summary: ObjectSizer will fail on java 16 and later
                 Key: GEODE-9475
                 URL: https://issues.apache.org/jira/browse/GEODE-9475
             Project: Geode
          Issue Type: Bug
          Components: core
            Reporter: Darrel Schneider


The instances of org.apache.geode.cache.util.ObjectSizer, SIZE_CLASS_ONCE, 
REFLECTION_SIZE, and DEFAULT will not work on java 16 and later because they 
call Field.setAccessible which is not allowed under normal conditions starting 
with java 16 (see: 
https://softwaregarden.dev/en/posts/new-java/illegal-access-in-java-16 ).

To workaround this failure set the JVM command line option: 
--illegal-access=permit

These ObjectSizer instances are used in a number of places internally by geode 
and can also explicitly be configured by users. Internally they are used by 
default for eviction (heap or mem), the wan gateway, and tombstone gc. Most all 
regions produce tombstones so that is the most likely point of failure.

The code that calls setAccessible is: 
org.apache.geode.internal.size.ObjectTraverser#buildFieldSet and it is not 
clear how this code can be changed to do its job without using setAccessible.





--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to