Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to and GraalVM slack:
mikeb 2020-01-30T02:26:05.030800Z

@ashwinbhskr I came across this guide to get jdbc working with native-image

mikeb 2020-01-30T02:26:50.031900Z

Has anyone been able to get postgres jdbc to compile with native-image?


We are using luchiniatwork/cambada Following works: RUN clojure -A:native-image \ --image-name ${PROJECT_NAME} \ --out target \ --graalvm-opt J-Xmx28g \ --graalvm-opt J-Xms6g \ --graalvm-opt -enable-https \ --graalvm-opt -enable-url-protocols=https \ --graalvm-opt H:+TraceClassInitialization \ --graalvm-opt -initialize-at-build-time=org.postgresql.Driver \ --graalvm-opt -initialize-at-build-time=org.postgresql.util.SharedTimer \ --graalvm-opt -initialize-at-run-time=org.postgresql.sspi.SSPIClient \ --graalvm-opt -initialize-at-run-time=org.httpkit.client.SslContextFactory \ --graalvm-opt -initialize-at-run-time=org.httpkit.client.HttpClient


We are also using next.jdbc


We have some custom serializers for postgres and it is important do do type hinting when doing java interoo


I.e (extend-protocol prepare/SettableParameter IPersistentMap (set-parameter [v ^PgPreparedStatement ps ^long i] (.setObject ps i (to-pg-json v))) ))

Ashwin Bhaskar 2020-01-30T04:27:38.032Z

@mikeb thanks! will check try it out and let you know