Description
CopyHelper.copy is an API that allows geode users to make copies of objects. It is also used internally by a number of geode features. The copy-on-read region attribute is one example. If the object being copied is an instance of Cloneable then on java 16, copy will throw a RuntimeException which is an instance of java.lang.reflect.InaccessibleObjectException.
The copy code tries to catch exceptions during the clone and instead use serialization to make a copy but it does not catch RuntimeException which is what java 16 throws from setAccessible. It would be pretty easy to fix this exception handling.
The only work arounds are to not implement Cloneable or to start the jvm with the command line option: --illegal-access=permit.
See: https://softwaregarden.dev/en/posts/new-java/illegal-access-in-java-16