I made a fairly small ktor project and am now tryi...
# ktor
r
I made a fairly small ktor project and am now trying to add Locations, but the second it's on the classpath (doesn't change if I install or don't) I get the following:
Copy code
Exception in thread "main" java.lang.AbstractMethodError: io.ktor.server.engine.ApplicationEngineEnvironmentReloading.getDevelopmentMode()Z
	at io.ktor.application.Application.<init>(Application.kt:20)
	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.instantiateAndConfigureApplication(ApplicationEngineEnvironmentReloading.kt:269)
	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.createApplication(ApplicationEngineEnvironmentReloading.kt:125)
	at io.ktor.server.engine.ApplicationEngineEnvironmentReloading.start(ApplicationEngineEnvironmentReloading.kt:245)
	at io.ktor.server.netty.NettyApplicationEngine.start(NettyApplicationEngine.kt:126)
	at io.ktor.server.netty.EngineMain.main(EngineMain.kt:26)
not sure where to go from here? This error isn't that descriptive
c
sounds like a class path problem. can you check that you have the same version of all ktor jars in the classpath?
r
will check, but should be, I'm using a variable for them, I'll share my build.gradle, two secs
c
you could add the bom to make sure that you have the correct ktor versions everywhere
r
I think you might be right on the version, just skimmed the ones IntelliJ refers to
image.png
c
you can run
./gradlew dependencies
🙌 1
r
I think I spotted it, two secs
the netty server was set to 1.4.0
it's starting now, thanks a lot, for pointing me in the obvious direction 🙂 I guess we all go code blind at times
c
add this:
Copy code
implementation(enforcedPlatform("io.ktor:ktor-bom:$ktorVersion"))
yw 🙂