Wellington Chevreuil created HBASE-29325: --------------------------------------------
Summary: Gson reflection failures on TestBucketCache.testCacheSimple Key: HBASE-29325 URL: https://issues.apache.org/jira/browse/HBASE-29325 Project: HBase Issue Type: Bug Reporter: Wellington Chevreuil Assignee: Wellington Chevreuil This seems to happen for some specific jdk implementations. Observed on my local environment when executing it with Java HotSpot(TM) 64-Bit Server VM (build 17.0.8+9-LTS-211: {noformat} [ERROR] org.apache.hadoop.hbase.io.hfile.bucket.TestBucketCache.testCacheSimple[0: blockSize=8,192, bucketSizes=null] Time elapsed: 1.722 s <<< FAILURE! java.lang.AssertionError: conversion to JSON should not fail, exception is:org.apache.hbase.thirdparty.com.google.gson.JsonIOException: Failed making field 'java.util.concurrent.locks.ReentrantLock#sync' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type. See https://github.com/google/gson/blob/main/Troubleshooting.md#reflection-inaccessible at org.junit.Assert.fail(Assert.java:89) at org.apache.hadoop.hbase.io.hfile.CacheTestUtils.testConvertToJSON(CacheTestUtils.java:371) at org.apache.hadoop.hbase.io.hfile.CacheTestUtils.testCacheSimple(CacheTestUtils.java:166) at org.apache.hadoop.hbase.io.hfile.bucket.TestBucketCache.testCacheSimple(TestBucketCache.java:237) {noformat} Apparently, the pre-commit build running with Eclipse Adoptium-17.0.11+9 doesn't face this problem. Possible fix is to set exclusion on private fields in the GsonUtil.createGson() method. -- This message was sent by Atlassian Jira (v8.20.10#820010)