79535619

Date: 2025-03-26 06:57:36
Score: 1.5
Natty:
Report link

Some additional research and debugging of my app after reading @MarkRotteveel's "java.management"-comment, led me to this post with these comments by @life888888 . Turns out that adding the java.management-module resolved the exception posted in my update.

However, after that, I got a NamingException which got resolved by adding the java.naming-module to the module-info.java.

Caused by: java.lang.NoClassDefFoundError: javax/naming/NamingException

But this lead to a GSSEexception:

Caused by: java.lang.NoClassDefFoundError: org/ietf/jgss/GSSException

I added the java.security.jgss-module to the module-info.java accordingly.

In my case, the JGSS-Module is needed because I utilize javafx.concurrent.Task to make my database queries.

With all the right modules in place, I also don't need to load the DriverManager manually via Class.forName() as suggested by @MarkRotteveel in this comment.

My functioning module-info.java:


module MYAPP {
    exports de.ron.application;
    exports de.ron.csv_import_export;
    exports de.ron.databaseutils;
    exports de.ron.gui;
    exports de.ron.gui.dialogs;
    exports de.ron.tools;

    opens de.ron.application to javafx.fxml;
    opens de.ron.gui to javafx.fxml;
    opens de.ron.gui.dialogs to javafx.fxml;

    requires com.fasterxml.jackson.core;
    requires com.fasterxml.jackson.databind;

    requires java.desktop;
    requires java.base;
    requires java.management;
    requires java.naming;
    requires java.security.jgss;
    requires transitive java.sql;

    requires javafx.fxml;
    requires transitive javafx.controls;
    requires transitive javafx.graphics;

    requires org.apache.commons.lang3;
    requires org.apache.logging.log4j;
}

Thanks for helping me solve this problem. I appreciate it very much.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @MarkRotteveel's
  • User mentioned (0): @life888888
  • User mentioned (0): @MarkRotteveel
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: DeRRoN