Having some trouble with a ktor app. It works all ...
# ktor
j
Having some trouble with a ktor app. It works all fine until I enable auto-refresh. Any idea what would cause this? ( More detail here: https://stackoverflow.com/questions/49782953/enabling-ktor-auto-reload-breaks-the-app )
n
Auto-refresh uses custom classloader. In my case, jackson loaded classes from different class loaders and it messed up everything.
j
Hmm, so some dependency that I'm using is using a different classloader. I wish there was a bit more info what's breaking this...
n
I fixed this by providing
OverridingClassLoader
class loader to the jackson
j
Could you elaborate on how to "provide
OverridingClassLoader
class loader to jackson"?
I found that adding " squash " is one example of something that leads to auto-reload not working any more..
these are the dependencies. +--- org.jetbrains.squashsquash0.2.4 | +--- org.jetbrains.kotlinkotlin runtime1.2.21 | | \--- org.jetbrainsannotations13.0 | +--- org.jetbrains.kotlinkotlin reflect1.2.21 -> 1.2.31 (*) | +--- org.jetbrains.kotlinkotlin stdlib jdk81.2.21 -> 1.2.31 (*) | \--- org.slf4jslf4j api1.7.24 -> 1.7.25