Fork me on GitHub
#graalvm
<
2020-01-23
>
Eamonn Sullivan22:01:57

Hi, I'm trying to create a native image out of a small app that uses clj-http. The app hits an API (at https) and needs client authentication using certs. It runs OK in the jvm, but if I try to create a native image out of it, I'm getting Error: No instances of .ssl.SSLContext are allowed in the image heap as this class should be initialized at image runtime. Am I reading that right, that I can't use anything SSL-ish in a native image? That seems kind of a severe limitation.

Nate Sutton22:01:54

not sure if it's a good solution but there's borkdude's fork that works with babashka which in theory means it will work with graalvm in general https://github.com/borkdude/clj-http-lite/

Nate Sutton22:01:59

unless there's something else going on

Nate Sutton22:01:30

(note: I have extremely little idea what I'm talking about)

borkdude22:01:41

affirmative, clj-http-lite works with graalvm

Eamonn Sullivan22:01:33

Ah, OK. Will try clj-http-lite.

borkdude22:01:29

my fork of martinklepsch's fork simply removed an external dependency (slingshot) so babashka didn't have to support that

borkdude22:01:41

but other than that it's the same

borkdude22:01:52

taylor's clojurl is also built using clj-http-lite: https://github.com/taylorwood/clojurl