Fork me on GitHub
#graalvm
<
2020-01-30
>
Ashwin Bhaskar04:01:38

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

mikeb02:01:50

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

rpofuk06:02:29

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

rpofuk06:02:47

We are also using next.jdbc

rpofuk06:02:16

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

rpofuk06:02:10

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