[jboss-jira] [JBoss JIRA] (WFLY-10244) [LP - RHV product] (7.x / CD) Using jboss-modules loading outside WildFly 12 is broken

Vaclav Tunka (JIRA) issues at jboss.org
Mon Apr 16 09:21:00 EDT 2018


Vaclav Tunka created WFLY-10244:
-----------------------------------

             Summary: [LP - RHV product] (7.x / CD) Using jboss-modules loading outside WildFly 12 is broken
                 Key: WFLY-10244
                 URL: https://issues.jboss.org/browse/WFLY-10244
             Project: WildFly
          Issue Type: Bug
    Affects Versions: 12.0.0.Final
            Reporter: Vaclav Tunka
            Assignee: David Lloyd


oVirt is using jboss-modules not only for dependencies inside WildFly, but also when executing command line tools outside WildFly process. We are using following method which worked fine from JBoss 7 to WildFly11:

export JAVA_MODULEPATH="<PATH TO OUR MODULES>"
exec "${JAVA_HOME}/bin/java" \                                                                                                                                                                                
        -jar "${JBOSS_HOME}/jboss-modules.jar" \                                                                                                                                                              
        -dependencies org.ovirt.engine.core.tools \                                                                                                                                                           
        -class org.ovirt.engine.core.cryptotool.Main \                                                                                                                                                        
        "$@"


where "org.ovirt.engine.core.tools" is one of our existing module and in class we have standard Java class with main() method executing logic of specific command line tool.

When I try to execute this code with WildFly 12.0.0.FINAL I receive following exception:

Exception in thread "main" java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:460)
	at java.util.Properties.setProperty(Properties.java:166)
	at java.lang.System.setProperty(System.java:796)
	at org.jboss.modules.PropertyWriteAction.run(PropertyWriteAction.java:40)
	at org.jboss.modules.PropertyWriteAction.run(PropertyWriteAction.java:28)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.jboss.modules.Main.main(Main.java:390)

When I tried to replace jboss-modules.jar provided by WildFly 12.0.0.FINAL with manuall build using latest code in 1.7 branch (commit a52a323c5c3d71cf9597f06951155e4639cbb707) I receive different error:

org.jboss.modules.ModuleNotFoundException: org.ovirt.engine.core.tools
	at org.jboss.modules.Module.addPaths(Module.java:1221)
	at org.jboss.modules.Module.link(Module.java:1577)
	at org.jboss.modules.Module.relinkIfNecessary(Module.java:1605)
	at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:296)
	at org.jboss.modules.Main.main(Main.java:426)

I haven't found any documentation describing such incompatible between 1.6 and 1.7, so is there any way how to have above execution compatible with both jboss-modules versions?

Thanks

Martin




--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list