You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
The GraalVM flag UnlockExperimentalVMOptions is not supported
in GrallVM 17.0, and is not required in 21.0 or 23.0. Removing
the flag restores compatibility with GraalVM 17.
Fixes#2140
Context
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.
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
,-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.Possible solution: removing the experimental flag
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
:See also
The text was updated successfully, but these errors were encountered: