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

mingkangpan

05/20/2019, 12:00 PM
hey I get this error
Copy code
Exception in thread "main" java.lang.ClassNotFoundException: Module function cannot be found for the fully qualified name 'com.minki.ktor.ApplicationKt.main'
g

gildor

05/20/2019, 12:51 PM
Try run it using Gradle task instead you use IDEA runner, often it doesn't work for me
m

mingkangpan

05/20/2019, 2:53 PM
tried task:run -> same error
d

Dico

05/20/2019, 7:33 PM
The function needs to match this signature:
fun Application.main()
g

gildor

05/21/2019, 12:26 AM
I checked again and now I see that this is Ktor exception, because apparently you don't have ApplicationKt.main function which returns ktor module, it should be a function without arguments, as Dico said above In your case your function has name
module
m

mingkangpan

05/21/2019, 10:51 AM
thanks it worked, I changed the conf file to use
module
modules = [ com.minki.ktor.ApplicationKt.module ]
4 Views