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
If the JSON configuration for allowed runtime reflection contains a class that is not on the class path, the tool tells me to verify that my configuration matches the schema:
error: Error parsing reflection configuration in /home/dsyer/dev/scratch/graal/reflect.json:
Class no.such.Object not found
Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option ReflectionConfigurationFiles.
The error is really that no.such.Object is not on the classpath, so it's confusing to tell me to check the JSON (which is perfectly valid).
Also running native-image -H:PrintFlags+ is an error:
$ native-image -H:PrintFlags+ -cp target/classes/ HelloWorld
Build on Server(pid: 18485, port: 37717)
error: Could not find option 'PrintFlags+'. Did you mean one of these: PrintFlags. Use -H:PrintFlags= to list all available options.
so it isn't helpful even if the JSON is really malformed. If there is a way to print some schema hints from the command line, that's great, but I still don't know what it is.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this behavior. The correct syntax for -H:PrintFlags= is -H:PrintFlags=<option-category> where the <option-category> is one of User, Expert, Debug. -H:ReflectionConfigurationFiles is in the User category and the help message for it is One or several (comma-separated) paths to JSON files that specify which program elements should be made available via reflection., so it doesn't actually show you the schema.
You are right, the error message is also wrong and it should instead tell you that the class is missing. By the way all this logic is in ReflectionConfigurationParser.java.
hi @dsyer , this issue has been inactive for more than 180 days. We’ll close it to focus on current issues. In case it’s still relevant, please reopen it and we’ll take another look. Thank you!
If the JSON configuration for allowed runtime reflection contains a class that is not on the class path, the tool tells me to verify that my configuration matches the schema:
The error is really that
no.such.Object
is not on the classpath, so it's confusing to tell me to check the JSON (which is perfectly valid).Also running
native-image -H:PrintFlags+
is an error:so it isn't helpful even if the JSON is really malformed. If there is a way to print some schema hints from the command line, that's great, but I still don't know what it is.
The text was updated successfully, but these errors were encountered: