Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError when creating table on Android #461

Closed
lio-hg opened this issue Jan 7, 2019 · 1 comment
Closed

NoClassDefFoundError when creating table on Android #461

lio-hg opened this issue Jan 7, 2019 · 1 comment
Assignees
Labels

Comments

@lio-hg
Copy link

lio-hg commented Jan 7, 2019

I'm using using H2 for testing purposes. This is the stack trace I'm getting:

01-07 13:08:18.709 8521-8521/exposedandroid.exposedandroid E/AndroidRuntime: FATAL EXCEPTION: main
    Process: exposedandroid.exposedandroid, PID: 8521
    java.lang.NoClassDefFoundError: org.jetbrains.exposed.sql.SchemaUtils$TableDepthGraph$sorted$1$1
        at org.jetbrains.exposed.sql.SchemaUtils$TableDepthGraph$sorted$1.invoke(SchemaUtils.kt:37)
        at org.jetbrains.exposed.sql.SchemaUtils$TableDepthGraph.sorted(SchemaUtils.kt:46)
        at org.jetbrains.exposed.sql.SchemaUtils.sortTablesByReferences(SchemaUtils.kt:72)
        at org.jetbrains.exposed.sql.SchemaUtils.createStatements(SchemaUtils.kt:79)
        at org.jetbrains.exposed.sql.SchemaUtils.create(SchemaUtils.kt:158)
        at exposedandroid.exposedandroid.MainActivity$onCreate$1.invoke(MainActivity.kt:20)
        at exposedandroid.exposedandroid.MainActivity$onCreate$1.invoke(MainActivity.kt:10)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:104)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:75)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:58)
        at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:58)
        at exposedandroid.exposedandroid.MainActivity.onCreate(MainActivity.kt:18)
        at android.app.Activity.performCreate(Activity.java:6212)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2601)
        at android.app.ActivityThread.access$800(ActivityThread.java:178)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
        at android.os.Handler.dispatchMessage(Handler.java:111)
        at android.os.Looper.loop(Looper.java:194)
        at android.app.ActivityThread.main(ActivityThread.java:5637)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

I created a repo to demostrate the error: https://github.com/lionelhg/ExposedAndroidBug

Is Android supported?

@Tapac
Copy link
Contributor

Tapac commented Jan 10, 2019

Ouch, it fails because of a clash in function Map.forEach from Java 8 and Kotlin stdlib.
Kotlin version should be used, but Java 8 has priority. I'll change SDK version on CI server to build Exposed with Java 7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants