hello :wave: not sure if this is the right channel...
# exposed
a
hello 👋 not sure if this is the right channel. I have a strange behaviour
exposed
with ktor. Intellij IDE, while running the Ktor application do not add the
org.jetbrains.kotlinx/kotlinx-datetime
, to the classpath, which ends with (obviously)
java.lang.ClassNotFoundException: kotlinx.datetime.TimeZone
I am not even using kotlinx-datetime, I switch to javatime. Nevertheless, any table that is using
timestamp
field, fails add it to database in runtime.
Works great when I run application from terminal, it's only Intellij that omit that dependency while generating the runtime classpath for app. The workaround is to open the run option, select more options (altr+m) add 'modify classpath', and select jar manually, ex ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-datetime-jvm/0.8.0-0.6.x-compat/c4bf6532a54e118f35afb24ac5f0dacacfc90e63/kotlinx-datetime-jvm-0.8.0-0.6.x-compat.jar
gradle dependency Insight:
Copy code
> Task :backend:dependencyInsight
org.jetbrains.kotlinx:kotlinx-datetime:0.8.0-0.6.x-compat
  Variant jvmRuntimeElements-published:
    | Attribute Name                     | Provided     | Requested    |
    |------------------------------------|--------------|--------------|
    | org.gradle.status                  | release      |              |
    | org.gradle.category                | library      | library      |
    | org.gradle.jvm.environment         | standard-jvm | standard-jvm |
    | org.gradle.jvm.version             | 8            | 25           |
    | org.gradle.libraryelements         | jar          | jar          |
    | org.gradle.usage                   | java-runtime | java-runtime |
    | org.jetbrains.kotlin.platform.type | jvm          | jvm          |
    | org.gradle.dependency.bundling     |              | external     |

org.jetbrains.kotlinx:kotlinx-datetime:0.8.0-0.6.x-compat
+--- runtimeClasspath
+--- project ':backend:modules:cart'
|    \--- runtimeClasspath
+--- project ':backend:modules:storage'
|    \--- runtimeClasspath
\--- project ':model'
     +--- runtimeClasspath
     +--- project ':backend:modules:cart' (*)
     +--- project ':backend:modules:catalog'
     |    +--- runtimeClasspath
     |    \--- project ':backend:modules:cart' (*)
     +--- project ':backend:modules:identity'
     |    \--- runtimeClasspath
     +--- project ':backend:modules:orders'
     |    \--- runtimeClasspath
     \--- project ':backend:modules:storage' (*)

org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.8.0-0.6.x-compat
  Variant jvmRuntimeElements-published:
    | Attribute Name                     | Provided     | Requested    |
    |------------------------------------|--------------|--------------|
    | org.gradle.status                  | release      |              |
    | org.gradle.category                | library      | library      |
    | org.gradle.jvm.environment         | standard-jvm | standard-jvm |
    | org.gradle.jvm.version             | 8            | 25           |
    | org.gradle.libraryelements         | jar          | jar          |
    | org.gradle.usage                   | java-runtime | java-runtime |
    | org.jetbrains.kotlin.platform.type | jvm          | jvm          |
    | org.gradle.dependency.bundling     |              | external     |
   Selection reasons:
      - By conflict resolution: between versions 0.8.0-0.6.x-compat and 0.7.1-0.6.x-compat

org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.8.0-0.6.x-compat
\--- org.jetbrains.kotlinx:kotlinx-datetime:0.8.0-0.6.x-compat
     +--- runtimeClasspath
     +--- project ':backend:modules:cart'
     |    \--- runtimeClasspath
     +--- project ':backend:modules:storage'
     |    \--- runtimeClasspath
     \--- project ':model'
          +--- runtimeClasspath
          +--- project ':backend:modules:cart' (*)
          +--- project ':backend:modules:catalog'
          |    +--- runtimeClasspath
          |    \--- project ':backend:modules:cart' (*)
          +--- project ':backend:modules:identity'
          |    \--- runtimeClasspath
          +--- project ':backend:modules:orders'
          |    \--- runtimeClasspath
          \--- project ':backend:modules:storage' (*)

org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.7.1-0.6.x-compat -> 0.8.0-0.6.x-compat
\--- org.jetbrains.exposed:exposed-core:1.5.0
     +--- project ':backend:modules:cart'
     |    \--- runtimeClasspath
     +--- project ':backend:modules:catalog'
     |    +--- runtimeClasspath
     |    \--- project ':backend:modules:cart' (*)
     +--- project ':backend:modules:storage'
     |    \--- runtimeClasspath
     +--- org.jetbrains.exposed:exposed-java-time:1.5.0
     |    +--- runtimeClasspath
     |    \--- project ':backend:modules:cart' (*)
     +--- org.jetbrains.exposed:exposed-dao:1.5.0
     |    +--- project ':backend:modules:cart' (*)
     |    +--- project ':backend:modules:catalog' (*)
     |    \--- project ':backend:modules:storage' (*)
     +--- org.jetbrains.exposed:exposed-kotlin-datetime:1.5.0
     |    +--- project ':backend:modules:catalog' (*)
     |    \--- project ':backend:modules:storage' (*)
     +--- org.jetbrains.exposed:exposed-jdbc:1.5.0
     |    +--- project ':backend:modules:cart' (*)
     |    +--- project ':backend:modules:catalog' (*)
     |    +--- project ':backend:modules:storage' (*)
     |    \--- org.jetbrains.exposed:exposed-dao:1.5.0 (*)
     \--- org.jetbrains.exposed:exposed-json:1.5.0
          +--- project ':backend:modules:cart' (*)
          +--- project ':backend:modules:catalog' (*)
          \--- project ':backend:modules:storage' (*)
it doesn't matter which kotlinx-datetime I use:
Copy code
0.8.0-0.6.x-compat 
0.7.1-0.6.x-compat
0.8.0
none is recognised. IntelliJ IDEA 2026.2.3 (262.10968.63) Runtime version: 25.0.4+1-b508.27 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. JCEF version: 144.0.15-262-b37