Fork me on GitHub
#graalvm
<
2020-04-24
>
katox08:04:37

It won't be easy (even the pgsql supports only the happy path). Usually major lifting is done by java folks around frameworks like micronaut or quarkus or spring boot. Search their blogs for tips.

borkdude12:04:57

@peterschwarz Did you manage to get sqlite to work at all though?

peterschwarz13:04:44

Not, yet, though I’ll take a look at your postgres work - it might give me some hints

borkdude13:04:25

postgres was by far the easiest to get going with graalvm, also because I found a working example from @yogthos

borkdude13:04:48

mysql requires a sh*t-ton of reflection config and it still didn't work

peterschwarz13:04:23

same with sqlite, from what I’ve seen

yogthos13:04:25

pg is the only one I could get jdbc to work with as well

peterschwarz13:04:07

With sqlite, I think the biggest hurdle is getting it to load the native library

peterschwarz13:04:04

Which, side question, is there any way to write those graal reflection classes using gen-class?

peterschwarz13:04:21

Seemed like I was running into some classpath issues on that front

borkdude13:04:28

@peterschwarz you don't need to generate classes, you just have to list them in a reflection-config.json file

peterschwarz13:04:44

Do those just go into a resources directory?

borkdude13:04:49

you can also use an agent to discover those classes using a runtime example

peterschwarz13:04:20

I take it one is able to express the same thing with just those json files?

peterschwarz13:04:24

:thinking_face:

peterschwarz13:04:36

I’ll have to take another stab at this tonight…

wcohen22:04:44

My primary struggle with this was that most libraries that have multiplatform natives embedded first copy the appropriate platform one to a temp directory and loadLibrary from there — I couldn’t figure out how to replicate that in graal at runtime. It may only work if sqlite or whatever exists on the system already, which is much less pain-free for the user

peterschwarz22:04:52

Yeah, I’m definitely fine with that approach