https://kotlinlang.org logo
#ktor
Title
# ktor
p

peekandpoke

05/17/2021, 6:33 AM
Hi there! I am using Ktor 1.5.1 with Kotlin 1.4.31. I also have hot-reload enabled in dev. There I am often times seeing
NoClassDefFoundException
after the Hot-reload occurred. The compilation takes about 5 secs. I now suspect that some of the class files might be read too early. Ktor is doing the reload of the classes on the next request. When this next request happens while not all class files are re-written, then the Class Loader might read inconsistent class files. Does this make sense? Is there anything else I could look for? Does someone else have the same issue? It is currently really annoying, since hot-reload basically does not work for us anymore. We need to restart the server after each change, which takes precious time and patience. Thank you in advance!
a

Aleksei Tirman [JB]

05/17/2021, 11:57 AM
Could you please file an issue here with a sample project for reproducing attached?
p

peekandpoke

05/17/2021, 12:25 PM
I can try to reproduce this with a small project. It seems though, that the problem did only start to arise once our project got kind of big.
🙏 1
2 Views