23 April 2018

How to fix Error: Error:Module production: java.lang.Exception: (no MessageCollector configured) when you use Kotlin 1.2.40 ?

Solution/Workaround for:
IntelliJ IDEA 2108.1
Kotlin 1.2.40 ONLY

Problem.
You try to run the program but you see this error:
Error:Module  production: java.lang.Exception: LOGGING: Loading modules: [java.se, javafx.base, javafx.controls, javafx.fxml, javafx.graphics, javafx.media, javafx.swing, javafx.web, jdk.accessibility, jdk.attach, jdk.compiler, jdk.dynalink, jdk.httpserver, jdk.incubator.httpclient, jdk.jartool, jdk.javadoc, jdk.jconsole, jdk.jdi, jdk.jfr, jdk.jshell, jdk.jsobject, jdk.management, jdk.management.cmm, jdk.management.jfr, jdk.management.resource, jdk.net, jdk.packager, jdk.packager.services, jdk.scripting.nashorn, jdk.sctp, jdk.security.auth, jdk.security.jgss, jdk.unsupported, jdk.xml.dom, oracle.desktop, oracle.net, java.base, java.compiler, java.datatransfer, java.desktop, java.xml, java.instrument, java.logging, java.management, java.management.rmi, java.rmi, java.naming, java.prefs, java.scripting, java.security.jgss, java.security.sasl, java.sql, java.sql.rowset, java.xml.crypto, jdk.internal.jvmstat, jdk.management.agent, jdk.jdwp.agent, jdk.internal.ed, jdk.internal.le, jdk.internal.opt, jdk.jlink] (no MessageCollector configured)
Solution is :
Rollback to the previous version and wait until Kotlin fixes the bug.

If you don't want to do that then:

Workaround:

  • 1.  Delete production folder in out folder
  • 2.  Run application
    • Bad news. You will need to do this every single time when you do changes to your program and you will try run again :(