简体   繁体   English

Wildlfy module.xml 一个java类的配置

[英]Wildlfy module.xml Configuration for one java class

I am testing an java application and getting this error:我正在测试一个 Java 应用程序并收到此错误:

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所以我的目的是修改module.xml文件

C:\\Program Files\\jboss\\wildfly\\modules\\system\\layers\\base\\org\\jboss\\remote-naming\\main 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.我想知道如何更改上面的 xml 文件以实现正常工作。

Instead of modify jboss system modules you can create your own modules您可以创建自己的模块,而不是修改 jboss 系统模块

create a directory /modules/com/xyz/some/main with files创建一个包含文件的目录 /modules/com/xyz/some/main

  1. module.xml模块.xml

  2. some-class.jar一些类.jar

some-class.jar一些类.jar

module.xml模块.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打开文件/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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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