graalvm

Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to https://github.com/clj-easy/graal-docs and https://github.com/BrunoBonacci/graalvm-clojure. GraalVM slack: https://www.graalvm.org/slack-invitation/.
futurile 2021-03-15T09:13:37.209400Z

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)

borkdude 2021-03-15T09:42:55.209700Z

@slgeorge same file

borkdude 2021-03-15T09:43:53.210700Z

the location/name of this file is configurable, but if you put it in META-INF it's picked up automatically

futurile 2021-03-15T09:53:20.210800Z

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.

borkdude 2021-03-15T10:12:25.211400Z

@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

futurile 2021-03-15T12:58:02.211500Z

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.

borkdude 2021-03-15T12:59:27.212Z

@slgeorge what happens if you run $GRAALVM_HOME/bin/java --version ?