Jason Zhao
11/27/2023, 11:39 PMbuild.gradle.kts
. But always exactly one of the two drivers gets detected.
Here is the erroring code (just trying to make a R2DBC connection pool):
pooledConnectionFactory = ConnectionFactories.get(
ConnectionFactoryOptions.builder()
.option(ConnectionFactoryOptions.DRIVER, "pool")
.option(ConnectionFactoryOptions.PROTOCOL, "postgresql")
.option(ConnectionFactoryOptions.HOST, config.host)
.option(ConnectionFactoryOptions.PORT, config.port)
.option(ConnectionFactoryOptions.USER, config.username)
.option(ConnectionFactoryOptions.PASSWORD, config.password)
.option(ConnectionFactoryOptions.DATABASE, config.database)
.build()
)
This is the error (in this case it found "pool" but didn't find "postgresql"):
Exception in thread "DefaultDispatcher-worker-2" java.lang.IllegalArgumentException: Could not find delegating driver [postgresql]
I have a really unusual setup though. The project is a multi-module KMP project, and the module I am building compiles to a Minecraft plugin (Spigot API) which loads after the game server itself, so that might be a potential issue. The module that has the R2DBC dependencies is different from the Minecraft module which is being compiled.
Both of the dependencies do show in the compiled JAR file as shown in the image below.
Anyone know what is wrong with my setup and how to get both drivers to be detected?hfhbd
11/28/2023, 6:17 AMJason Zhao
11/28/2023, 1:23 PM