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/.
tees 2020-05-10T01:42:30.232100Z

Heyo. I'm trying to compile again with graal using a file watcher library. I'm getting this error when running the server:

JVM Exception: #error {
 :cause Class java.nio.file.StandardWatchEventKinds$StdWatchEventKind[] is instantiated reflectively but was never registered. Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection
 :via
I've tried adding this reflection file, but without much luck:
[
  {
    "name" : "java.nio.file.StandardWatchEventKinds",
    "allDeclaredConstructors" : true,
    "allPublicConstructors" : true,
    "allDeclaredMethods" : true,
    "allPublicMethods" : true,
    "allDeclaredClasses" : true,
    "allPublicClasses" : true
  }
]
Anybody have any advice ?

tees 2020-05-10T01:44:54.232400Z

github repo if relevant: https://github.com/theiceshelf/firn/tree/feat/server

borkdude 2020-05-10T06:49:47.233300Z

@tees you need to register the array, not the class element

tees 2020-05-10T11:27:15.233700Z

Ok, thanks. I suppose I took the wording Register the class by using... too literally.

tees 2020-05-10T11:34:51.234100Z

It works! Thanks so much (again)!

2020-05-10T11:35:47.234300Z

\o/

😅 1
🙃 1