-
-
Notifications
You must be signed in to change notification settings - Fork 202
Closed
Description
The data source class used when using pgsql (com.impossibl.postgres.jdbc.PGDataSource) does not have a url property and instead takes separate host/port/database arguments.
When using the Jdbi module with the pgsql driver, the following error is received when starting the application:
java.lang.RuntimeException: Property url does not exist on target class com.impossibl.postgres.jdbc.PGDataSource
at com.zaxxer.hikari.util.PropertyElf.setProperty(PropertyElf.java:131)
at com.zaxxer.hikari.util.PropertyElf.lambda$setTargetFromProperties$0(PropertyElf.java:57)
at java.util.Hashtable.forEach(Hashtable.java:878)
at com.zaxxer.hikari.util.PropertyElf.setTargetFromProperties(PropertyElf.java:52)
at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:315)
at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:108)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:99)
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:71)
at org.jooby.jdbc.Jdbc.configure(Jdbc.java:364)
at org.jooby.jdbi.Jdbi.configure(Jdbi.java:172)
at org.jooby.Jooby.install(Jooby.java:3144)
at org.jooby.Jooby.lambda$bindService$49(Jooby.java:2833)
at org.jooby.Jooby.lambda$null$44(Jooby.java:2689)
at javaslang.control.Try.run(Try.java:52)
at org.jooby.Jooby.lambda$bootstrap$47(Jooby.java:2678)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:84)
at org.jooby.Jooby.lambda$new$0(Jooby.java:706)
at org.jooby.Jooby.bootstrap(Jooby.java:2753)
at org.jooby.Jooby.start(Jooby.java:1960)
at org.jooby.Jooby.start(Jooby.java:1942)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jooby.run.Main.lambda$startApp$1(Main.java:237)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)Removing the url from the configuration also causes an error as the Jdbc module attempts to get db.url from config which throws when it is not present.