I'm having a problem with graalvm 21.0.0.2. I've been running the agent and putting the output into resources/META-INF/native-image. When I run the compile it complains "Error: Error parsing reflection configuration in jar:file:/home/steve/workspace/lant-play/target/uberjar/lant-play-0.1.0-SNAPSHOT-standalone.jar!/META-INF/native-image/reflect-config.json: Method java.lang.reflect.Method.canAccess(Object) not found. To allow unresolvable reflection configuration, use option -H:+AllowIncompleteClasspath". I found a note on https://github.com/lread/clj-graal-docs#hello-world about adding a java.lang.reflect.AccessibleObject to "reflection.json". Is that the same file as reflect-config.json that the agent creates, or is it a different file? And if it's a different file where do I put it (putting it into META-INF/native-image isn't working)
@slgeorge same file
the location/name of this file is configurable, but if you put it in META-INF it's picked up automatically
so if I remove the content of reflect-config.json that the agent creates and just put in the java.lang.reflect.Method thing (from the lread repo) then it compiles.
@slgeorge Looking closer: > Method java.lang.reflect.Method.canAccess(Object) not found. This probably means you are running java8. This method is only available on java11
well it's beaten me for this week - I'll try and see if I can figure out what's happening next weekend. I've removed all the java8's from my system (linux), but it keeps on with that error.
@slgeorge what happens if you run $GRAALVM_HOME/bin/java --version
?