简体   繁体   中英

Wildlfy module.xml Configuration for one java class

I am testing an java application and getting this error:

org.jboss.naming.remote.protocol.NamingIOException: Failed to rebind [Root exception is java.io.IOException: java.lang.ClassNotFoundException: de.brockhaus.userMgmt.control.process.SomeProcess from [Module "org.jboss.remote-naming:main" from local module loader @ed17bee (finder: local module finder @2a33fae0 (roots: C:\Program Files\jboss\wildfly\modules,C:\Program Files\jboss\wildfly\modules\system\layers\base))]]
...
Caused by: java.io.IOException: java.lang.ClassNotFoundException: de.brockhaus.userMgmt.control.process.SomeProcess from [Module "org.jboss.remote-naming:main" from local module loader @ed17bee (finder: local module finder @2a33fae0 (roots: C:\Program Files\jboss\wildfly\modules,C:\Program Files\jboss\wildfly\modules\system\layers\base))]

So my purpose is modifying the module.xml file of

C:\\Program Files\\jboss\\wildfly\\modules\\system\\layers\\base\\org\\jboss\\remote-naming\\main

<module xmlns="urn:jboss:module:1.3" name="org.jboss.remote-naming">
    <resources>
        <resource-root path="jboss-remote-naming-2.0.4.Final.jar"/>
    </resources>

    <dependencies>
        <module name="javax.api"/>
        <module name="org.jboss.ejb-client" optional="true"/>
        <module name="org.jboss.remoting"/>
        <module name="org.jboss.logging"/>
        <module name="org.jboss.marshalling"/>
        <module name="org.jboss.marshalling.river"/>
        <module name="de.brockhaus.userMgmt.control.process"/>
    </dependencies>
</module>

But this also gives errors. I would like to know how to change this above xml file in order to achieve the things working right.

Instead of modify jboss system modules you can create your own modules

create a directory /modules/com/xyz/some/main with files

  1. module.xml

  2. some-class.jar

some-class.jar

module.xml

<module xmlns="urn:jboss:module:1.3" name="com.xyx.some">
    <resources>
        <resource-root path="some-class.jar"/>
    </resources>

    <dependencies>
        <module name="org.jboss.remote-naming"/>
    </dependencies>
</module>

and add it as part of global module configuration

open file /standalone/configuration/standalone-full.xml

<subsystem xmlns="urn:jboss:domain:ee:4.0">
            <global-modules>
                <module name="com.microfocus.itom.nom.common" slot="main"/>
            </global-modules>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM