While running our GraalVM native tests in our Spring Cloud GCP Cloud SQL MySQL sample, we found the following error due to a flag not supported in GraalVM for JDK 17.
Error: Could not find option 'UnlockExperimentalVMOptions' from 'jar:file:///home/runner/.m2/repository/com/google/cloud/sql/jdbc-socket-factory-core/1.23.1/jdbc-socket-factory-core-1.23.1.jar!/META-INF/native-image/com.google.cloud.sql/cloud-sql-jdbc-socket-factory-parent/native-image.properties'. Use -H:PrintFlags= to list all available options.
The problematic UnlockExperimentalVMOptions
flag is used in the native-image.properties file of cloud-sql-jdbc-socket-factory.
The experimental options that are unlocked by the mentioned flag are:
-H:ReflectionConfigurationResources
,
declared as experimental-H:ResourceConfigurationResources
, declared as-H:DynamicProxyConfigurationResources
, declared asThe -H:UnlockExperimentalVMOptions
flag was introduced in oracle/graal#7190 and was further modified in oracle/graal#7370.
However, while wondering if removing this flag would have any effect on GraalVM 17, 21, 23, I raised cloud-sql-jdbc-socket-factory#2139 as a tentative solution.
Running the test locally with the following dependency:
Ended up with the following results for MODULE_UNDER_TEST=sql-mysql-sample bash .github/workflows/scripts/native-image-tests.sh
:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4