Reputation: 313
I'm trying to used exposed and h2 for storage inside a ktor server.
After setting up an in memory connection with Database.connect("jdbc:h2:mem:test", driver = "org.h2.Driver")
Whenever I try to read/write to the database I get the following error:
java.lang.NoSuchMethodError:
org.h2.jdbc.JdbcConnection.getSettings()Lorg/h2/jdbc/JdbcConnection$Settings; at org.jetbrains.exposed.sql.vendors.H2Kt.isMySQLMode(H2.kt:17)
My build.gradle.kts contains the following:
implementation("com.h2database", "h2", "1.4.197")
implementation("org.jetbrains.exposed", "exposed-core", "0.24.1")
implementation("org.jetbrains.exposed", "exposed-dao", "0.24.1")
implementation("org.jetbrains.exposed", "exposed-jdbc", "0.24.1")
Any ideas?
Upvotes: 2
Views: 1265
Reputation: 313
As pointed out by Evgenij Ryazanov in the comments above, turns out this is an issue with my the combination of versions i'm using.
As a temporary fix I've updated my H2 version to 1.4.200
Upvotes: 1