-
Bug
-
Resolution: Done
-
Major
-
12.0.0.Final
-
None
-
None
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
- is caused by
-
MODULES-271 NPE when using -class option
- Resolved
- is cloned by
-
JBEAP-14618 [LP - RHV product] (7.x / CD) Using jboss-modules loading outside WildFly 12 is broken
- Closed
- is incorporated by
-
WFCORE-3684 Upgrade JBoss Modules to 1.8.0.Final
- Resolved