Hey, I'm running into an error with a freshly gen...
# ktor
t
Hey, I'm running into an error with a freshly generated Ktor project generated with the Ktor Project Generator . I'm getting an error
Exception in thread "Main" java.lang.NoClassDefFoundError: kotlin/jdk7/AutoCloseableKt
. It seems to be related to the newest Ktor release (2.3.1) and the H2 driver, because with Ktor 2.2.4 the app runs just fine, and so it does with 2.3.1 and PostgreSQL driver. Here's the full stacktrace. Any ideas?
a
Can you please describe what plugins and configuration for the generated project did you choose?
t
Sure! Here's my configuration: And I did no changes at all to the generated placeholder code, just tried to start the application through IntelliJ IDEA with the provided placeholders.
a
Unfortunately, I cannot reproduce this exception by running the sample project via the gutter icon in IntelliJ IDEA. Can you provide more information about your environment (JDK, OS, etc)?
t
I'm running on Windows 11. JDK 17:
Copy code
lepol@tommi-desktop MINGW64 ~
$ java --version
openjdk 17.0.6 2023-01-17
OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)
Maven 3.9.2:
Copy code
$ mvn --version
Apache Maven 3.9.2 (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c)
Maven home: C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.2
Java version: 17.0.6, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot
Default locale: fi_FI, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
There's a bit more recent version of JDK available (17.0.7+7), I might try that. Which JDK did you run it successfully with?
a
JDK 11
t
I assume the project should support more recent versions as well?
a
Yes
t
Alright. I'll give the more recent JDK 17 a go and then test with the JDK 11 myself. Perhaps there's an actual issue to be resolved if it seems to run with JDK 11 for myself as well, but not with the most recent JDK 17? 🙂