テーブルを作成しようとしています (postgres + exposed + ktor + JDBC)、そのエラーが発生しました。
私が持っている以下の構成を見つけてください:
build.gradle
compile group: 'postgresql', name: 'postgresql', version: '9.0-801.jdbc4'
ハロー.kt
object Pays : Table() {
val id = integer("id").autoIncrement().primaryKey() // Column
val name = varchar("name", 50) // Column
}
fun main(args: Array) {
Database.connect("jdbc:postgresql://localhost/my_db", driver = "org.postgresql.Driver", user = "user", password = "password")
ここに私が得たエラーがあります
Caused by: org.postgresql.util.PSQLException: Transaction isolation level 4 not supported.
at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:826)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManager$ThreadLocalTransaction$connectionLazy$1.invoke(ThreadLocalTransactionManager.kt:25)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManager$ThreadLocalTransaction$connectionLazy$1.invoke(ThreadLocalTransactionManager.kt:20)
at kotlin.UnsafeLazyImpl.getValue(Lazy.kt:154)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManager$ThreadLocalTransaction.getConnection(ThreadLocalTransactionManager.kt:29)
at org.jetbrains.exposed.sql.Transaction.getConnection(Transaction.kt)
at org.jetbrains.exposed.sql.Database.getMetadata$exposed(Database.kt:17)
at org.jetbrains.exposed.sql.Database$url$2.invoke(Database.kt:26)
at org.jetbrains.exposed.sql.Database$url$2.invoke(Database.kt:15)
at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:131)
at org.jetbrains.exposed.sql.Database.getUrl(Database.kt)
at org.jetbrains.exposed.sql.Database$dialect$2.invoke(Database.kt:29)
at org.jetbrains.exposed.sql.Database$dialect$2.invoke(Database.kt:15)
at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:131)
at org.jetbrains.exposed.sql.Database.getDialect$exposed(Database.kt)
at org.jetbrains.exposed.sql.vendors.DefaultKt.getCurrentDialect(Default.kt:319)
at org.jetbrains.exposed.sql.vendors.DefaultKt.getCurrentDialectIfAvailable(Default.kt:323)
at org.jetbrains.exposed.sql.Column.getOnDelete$exposed(Column.kt:14)