I'm trying to configure Micronaut SQL jasync with the following configuraiton:
jasync:
client:
host: myhost
port: 5432
database: mydb
username: myusername
password: mypassword
maxActiveConnections: 10
ssl:
mode: require
When I try to connect t the database I get the following error:
Message: 'void com.github.jasync.sql.db.SSLConfiguration.<init>(com.github.jasync.sql.db.SSLConfiguration$Mode, java.io.File)'
Path Taken: new FaultApiController([SimpleFaultData faultData]) --> new SimpleFaultData([Connection client]) --> new JasyncPostgreSQLClientFactory([JasyncPoolConfiguration jasyncPoolConfiguration])
io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type [io.micronaut.configuration.jasync.JasyncPostgreSQLClientFactory]
...
Caused by: java.lang.NoSuchMethodError: 'void com.github.jasync.sql.db.SSLConfiguration.<init>(com.github.jasync.sql.db.SSLConfiguration$Mode, java.io.File)'
Looking on github I found the following issue that sounds similar but shows as resolved: https://github.com/micronaut-projects/micronaut-sql/issues/104
Am I configuring the jasync connector incorrectly or is this bug still present? Also, I can't figure out how to implement the work around. There doesn't seem to be enough information for me to understand it. Any clarifications or suggested work arounds would be helpful.
Micronaut 2.5.7 is not compatible with the latest version of jasync (1.2.2). Also, Micronaut-SQL is not managing the jasync dependency. An issues has been filed:
https://github.com/micronaut-projects/micronaut-sql/issues/474
To work around this, drop back to the 1.1.4 version of jasync.