WildFly 37.0.0.Final Management Console Bug

81 views
Skip to first unread message

Osman Balci

unread,
Aug 29, 2025, 7:21:02 PMAug 29
to WildFly
The following module.xml file:
-----
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.9">
    <resources>
        <resource-root path="mysql-connector-j-9.4.0.jar"/>
    </resources>
    <dependencies>
        <module name="jakarta.api"/>
        <module name="jakarta.transaction.api"/>
        <module name="jakarta.xml.bind.api"/>
    </dependencies>
</module>
------
is placed in /Installation Folder/wildfly/modules/system/layers/base/com/mysql/main/
directory together with mysql-connector-j-9.4.0.jar

When added using the management console, it produces:
WFLYJCA0041: Failed to load module for driver [com.mysql]
WFLYJCA0115: Module for driver [com.mysql] or one of its dependencies is missing: [jakarta.api]

As a workaround, I inserted the following code in the standalone.xml configuration file, which fixed the problem.
                    <driver name="mysql" module="com.mysql">
                        <driver-class>com.mysql.cj.jdbc.Driver</driver-class>
                        <xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class>
                    </driver>

This tells me that the management console has a bug and is unable to add the JDBC driver as a module.

Bartosz Baranowski

unread,
Sep 1, 2025, 4:45:42 AMSep 1
to WildFly
By management console you mean CLI or HAL?

As to error message it does not make much sense without above context or exact steps you performed. Can you provide exact step-by-step guide how to reproduce?

Osman Balci

unread,
Sep 1, 2025, 9:50:33 AMSep 1
to WildFly
Here are the instructions for my students to open the Management Console:

Screenshot.png

Bartosz Baranowski

unread,
Sep 5, 2025, 8:04:37 AMSep 5
to WildFly
✘-INT ~/redhat/git/wildfly/ee-dist/target/wildfly-38.0.0.Beta1-SNAPSHOT [master|⚑ 6]  
13:46 $ ll modules/system/layers/base/jakarta/
total 96K
drwxrwxr-x 24 baranowb baranowb 4,0K wrz  5 13:17 ./
drwxrwxr-x 17 baranowb baranowb 4,0K wrz  5 13:17 ../
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 activation/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 annotation/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 batch/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 data/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 ejb/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 el/
drwxrwxr-x  4 baranowb baranowb 4,0K wrz  5 13:17 enterprise/
drwxrwxr-x  4 baranowb baranowb 4,0K wrz  5 13:17 faces/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 inject/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 interceptor/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 jms/
drwxrwxr-x  4 baranowb baranowb 4,0K wrz  5 13:17 json/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 mail/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 persistence/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 resource/
drwxrwxr-x  5 baranowb baranowb 4,0K wrz  5 13:17 security/
drwxrwxr-x  5 baranowb baranowb 4,0K wrz  5 13:17 servlet/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 transaction/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 validation/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 websocket/
drwxrwxr-x  3 baranowb baranowb 4,0K wrz  5 13:17 ws/
drwxrwxr-x  5 baranowb baranowb 4,0K wrz  5 13:17 xml/


Also, Im fairly sure you wont get as far as missing jakarta.api, since module.xml is missing "name" attribute in "module" tag.  IF server does not explode when you put that piece of XML than there is a bug or feature elsewhere.


This should do the trick:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.9" name="com.mysql">

    <resources>
        <resource-root path="mysql-connector-j-9.4.0.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>

        <module name="jakarta.xml.bind.api"/>
       
    </dependencies>
</module>

Osman Balci

unread,
Sep 10, 2025, 10:25:44 AMSep 10
to WildFly
I downloaded newly released version 37.0.1 and tried it again hoping that the bug is fixed.
Unfortunately, it gives the following error when adding the JDBC driver:
--------
10:13:11,494 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
10:13:11,494 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
10:13:11,495 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly 37.0.1.Final (WildFly Core 29.0.1.Final) started in 1214ms - Started 313 of 535 services (330 services are lazy, passive or on-demand) - Server configuration file in use: standalone.xml - Minimum feature stability level: community
10:15:07,525 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 4) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "mysql")
]) - Stage: (RUNTIME) - failure description: "WFLYJCA0041: Failed to load module for driver [com.mysql]"
----------

I used the module.xml file given above as:
-----------
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.9">
    <resources>
        <resource-root path="mysql-connector-j-9.4.0.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        <module name="jakarta.xml.bind.api"/>
    </dependencies>
</module>
-----------
But it still does not work.

Before, I asked my 71 students to manually enter the JDBC entry into the standalone.xml file. However, some of them ended up corrupting the file.

After manually entering the JDBC into standalone.xml, I was unable to create a new datasource. It couldn't find the JDBC driver although the info is in the standalone file.

My 71 students and I desperately need a resolution for this issue.

Osman Balci

unread,
Sep 10, 2025, 11:02:42 AMSep 10
to WildFly
The issue has been resolved!

As Bartosz indicated earlier and I missed: name="com.mysql" attribute is required. So, the working module.xml must be given as follows:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.9" name="com.mysql">
    <resources>
        <resource-root path="mysql-connector-j-9.4.0.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        <module name="jakarta.xml.bind.api"/>
    </dependencies>
</module>

Many thanks Bartosz!!!


Reply all
Reply to author
Forward
0 new messages