@ashwinbhskr I came across this guide to get jdbc working with native-image https://micronaut-projects.github.io/micronaut-data/latest/guide/#graalJDBC
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))) ))
@mikeb thanks! will check try it out and let you know