is it possible to add reflection config for an interface? i'm playing with netty and while i got it to compile it now throws tons of "missing method" warnings at runtime, all the ChannelInboundHandler interface.
hmm
[io.netty/netty-transport-native-epoll "4.1.50.Final" :classifier "linux-x86_64"]
installing that platform-specific binary won't let native-image compile. remove the :classifier and it works@vale yes, I have lots of interfaces in the reflection config for babashka
gonna check it out for reference. for now i ran the -agentlib=native-image-agent thing and had graal generate the config files
That works but only for classes it actually runs during execution. In babashka it is unknown which classes are going to be used by a user
I generate the config using a script, the config itself it gitignored
yeah my goal was to just check if this will build at all (gonna turn it into a library eventually)
what script do you use to generate the config?
script/reflection
Hey, I'm trying to get HikariCP to work with GraalVM, but hitting a wall atm.
(hikari-cp/make-datasource {:jdbc-url "jdbc:<postgresql://localhost:5432/postgres?user=postgres&password=postgres%22|postgresql://localhost:5432/postgres?user=postgres&password=postgres">})
This line, with GraalVM, returns the following error:
Exception in thread "main" com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: null
at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:576)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
at hikari_cp.core$make_datasource.invokeStatic(core.clj:248)
at myapp.main$_main.invokeStatic(main.clj:65)
at myapp.main$_main.doInvoke(main.clj:64)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at myapp.main.main(Unknown Source)
Caused by: java.lang.NullPointerException
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541)
However, when I run it with clj -m myapp.main
it works. Anyone have an idea?@kevin.van.rooijen Take a look at the pgmig project, it uses hikari. Could be Postgres a driver problem. You need this flag for postgres: https://github.com/babashka/babashka-sql-pods/blob/5d0f2a2ce8c7b82a8df1a51e8a44411e01c93d4f/script/compile#L60
haha I was litterally using that as reference, I actually have that flag enabled
I'll take a deeper look, thanks
Good to know that Hikari can work, I just need to figure it out
Where are you creating the data-source, not top level I hope?
No, I just put it in main for debugging purposes
right
I think pgmig used a patched version of hikari.
Yeah looks like it
new project: https://github.com/justone/brisk
many thanks to @borkdude for his help