question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not initialize class xxx_object_table

See original GitHub issue

This is my error log: image

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

image


<kotlin.version>1.3.40</kotlin.version>
<jetbrains.exposed.version>0.16.1</jetbrains.exposed.version>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Linuxeacommented, Apr 16, 2020

When I upgrade the exposed and kotlin to the latest version, this error disappears.

0reactions
Tapaccommented, Mar 17, 2020

Could you please attach the whole stacktrace with NoClassDefFound (and any other exceptions above and below)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found