I'm using Exposed as my database library and I'm getting these errors when I try to run my code:
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/reflect/full/KClasses
at org.jetbrains.exposed.sql.Table.clone(Table.kt:196)
at org.jetbrains.exposed.sql.Table.cloneWithAutoInc(Table.kt:234)
at org.jetbrains.exposed.sql.Table.autoIncrement(Table.kt:238)
at org.jetbrains.exposed.sql.Table.autoIncrement$default(Table.kt:238)
at vanilla.jubeatbook.data.Songs.<init>(SQLObjects.kt:14)
at vanilla.jubeatbook.data.Songs.<clinit>(SQLObjects.kt:13)
at vanilla.jubeatbook.backend.MainKt$main$1.invoke(Main.kt:22)
at vanilla.jubeatbook.backend.MainKt$main$1.invoke(Main.kt)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:70)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:58)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:49)
at vanilla.jubeatbook.backend.MainKt.main(Main.kt:21)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.ClassNotFoundException: kotlin.reflect.full.KClasses
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
Code snippet for SQLObjects.kt
:
object Songs : Table() {
val _id = integer("_id").autoIncrement().primaryKey() // Line 14
val songId = integer("song_id")
val title = text("title")
val artist = text("artist")
val levelBSC = integer("level_bsc")
val levelADV = integer("level_adv")
val levelEXT = integer("level_ext")
}
I think I followed the sample code right but I can't just figure out what throws these.