Could not initialize class xxx_object_table
See original GitHub issueThis is my error log:
This is my object table UserForbidTalkHistoryTable
object UserForbidTalkHistoryTable : Table("user_forbid_talk_history") {
val id = long("id").autoIncrement().primaryKey()
val uid = long("uid")
val adminId = long("admin_id")
val platformNo = long("platform_no")
val phone = varchar("phone", 15)
val reason = varchar("reason", 200)
val startTime = datetime("start_time")
val endTime = datetime("end_time")
val enable = bool("enable")
val createTime = datetime("create_time")
val updateTime = datetime("update_time")
}
The error occurs in code
override fun countByUserId(userId: Long): Boolean {
val now = DateTime(Date())
// and errors occurs UserForbidTalkHistoryTable.select
val count = UserForbidTalkHistoryTable.select {
UserForbidTalkHistoryTable.uid.eq(userId)
.and(UserForbidTalkHistoryTable.enable.eq(true))
.and(UserForbidTalkHistoryTable.startTime.lessEq(now))
.and(UserForbidTalkHistoryTable.endTime.greaterEq(now))
}.count()
return count > 0
}
Something really strange sometimes happens after spring boot starts, but this error may disappear after I restart the spring boot application. I really don’t know why throws such an error.
my version
<kotlin.version>1.3.40</kotlin.version>
<jetbrains.exposed.version>0.16.1</jetbrains.exposed.version>
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When I upgrade the exposed and kotlin to the latest version, this error disappears.
Could you please attach the whole stacktrace with
NoClassDefFound
(and any other exceptions above and below)?