This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-21
Channels
- # announcements (1)
- # architecture (392)
- # babashka (3)
- # beginners (1)
- # calva (2)
- # cider (1)
- # clojure (30)
- # clojure-denmark (2)
- # clojure-dev (9)
- # clojure-europe (13)
- # clojure-italy (2)
- # clojure-japan (17)
- # clojure-korea (8)
- # clojure-nl (1)
- # clojure-norway (74)
- # clojure-uk (3)
- # clojurescript (6)
- # code-reviews (8)
- # conjure (1)
- # data-science (1)
- # datascript (7)
- # datomic (1)
- # fulcro (1)
- # graalvm (9)
- # humbleui (3)
- # hyperfiddle (11)
- # leiningen (4)
- # lsp (7)
- # malli (7)
- # off-topic (57)
- # other-languages (9)
- # overtone (7)
- # shadow-cljs (30)
- # sql (15)
- # squint (3)
- # timbre (3)
- # vim (6)
Has anyone had any lucky generating a native image with Pedestal and all of its Metrics and SLF4J dependencies? I’m working my way through various issues and have hit a bit of a wall here.
Warning: Aborting stand-alone image build. Detected a FileDescriptor in the image heap. File descriptors opened during image generation are no longer open at image runtime, and the files might not even be presen>The culprit object has been instantiated by the 'com.codahale.metrics.ScheduledReporter' class initializer with the following trace:
at java.io.FileDescriptor.(FileDescriptor.java:127)
at java.io.FileOutputStream.(FileOutputStream.java:226)
at ch.qos.logback.core.recovery.ResilientFileOutputStream.(ResilientFileOutputStream.java:26)
at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:206)
at ch.qos.logback.core.FileAppender.start(FileAppender.java:126)
at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:104)
at ch.qos.logback.core.model.processor.AppenderModelHandler.postHandle(AppenderModelHandler.java:84)
I’ve seen an example of an older Pedestal app working in the https://github.com/clj-easy/graalvm-clojure/tree/master/pedestal but with clj-nix and Pedestal 0.6.3 things don’t work quite so nicely.In the meantime, any pointers from anyone who’s already walked this path would be immensely appreciated!
This is likely due to a top level expression in some code. Pushing it to a delay will likely solve the issue
I could open a PR to delay initialising telemetry on Pedestal. My concern is the effect such a change might have on downstream code.
well, you could at the very least first fork the project to see if this is the issue
@U06FTAZV3 which GraalVM version are you using?
I'm asking because this might solve the issue in graalvm 22, not sure: https://medium.com/graalvm/welcome-graalvm-for-jdk-22-8a48849f054c#df1e
@U04V15CAJ I haven’t upgraded from 21 yet. I can give 22 a try and loop back.