Module function cannot be found in 1.2.0
See original GitHub issueKtor Version
1.2.0
Ktor Engine Used(client or server and name)
Ktor server
JVM Version, Operating System and Relevant Context
java version “1.8.0_151” MacOS
Feedback
I’ve migrated mi running project from 1.1.5 to 1.2.0 and I’ve the following error.
Exception in thread "main" java.lang.ClassNotFoundException: Module function cannot be found for the fully qualified name 'cat.helm.catformacio.ApplicationKt.module'
Has the configuration changed?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:19 (1 by maintainers)
Top Results From Across the Web
Ktor - Quickstart new project from plugin throwing Error
java.lang.ClassNotFoundException : Module function cannot be found for the fully qualified name 'com.example.ApplicationKt.module' ?
Read more >6.4. Imputation of missing values - Scikit-learn
Univariate feature imputation¶. The SimpleImputer class provides basic strategies for imputing missing values. Missing values can be imputed with a provided ...
Read more >Use Java 8 language features and APIs - Android Developers
Discover the Java 8 language features you can use, how to properly configure your project to use them, and any known issues you...
Read more >Version Constraints - Configuration Language | Terraform
Version constraint strings specify a range of acceptable versions for modules, providers, and Terraform itself. Learn version constraint syntax and ...
Read more >Azure Durable Function - Python - Module not found
Azure Durable Function - Python - Module not found ... aiohttp==3.8.3; aiosignal==1.2.0; anyio==3.6.1; async-timeout==4.0.2; attrs==22.1.0 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This worked for me ONLY if my file name was exactly Application.kt (I had chosen server.kt), and my function as: fun Application.module() {} (no parameter). This differs from the ktor docs https://ktor.io/docs/create-server.html#engine-main.
The design decision to wrap “main” and force the user to conform to your custom “main” format is never a good one because your lib is not the heart of my program. Let me be in control and pass you a callback function, if you absolutely MUST schedule the run of “main” yourself.
The decision to define what is “main” in a conf file is even crazier. What web app needs entry point A today, but tomorrow somehow there’s a compelling reason to stop the server (which should never happen) and restart at entry point B?
This whole .conf file is just one more thing that can go wrong, and is massive overkill to define the port and IP, as is clear by all the search hits (should be optional).
The “embeddedServer” interface is nice clean and kotlin-like. But based on the docs, etc, it seems like it may be meant for debug not deploy? Does it have perf or other limitations? If it does not, it would be nice to make that clear.
Same problem. It is not good that users cannot run projects generated by KTor website 😦
In
ApplicationEngineEnvironmentReloading.kt
at last line ofisApplicableFunction
for default boolean parameter we have it.kind == KParameter.Kind.VALUE, not KParameter.Kind.INSTANCE.