[jboss-jira] [JBoss JIRA] (WFLY-10199) Using jboss-modules loading outside WildFly 12 is broken
Brian Stansberry (JIRA)
issues at jboss.org
Mon Jul 16 11:35:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-10199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry updated WFLY-10199:
------------------------------------
Description:
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:
{code}
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 \
"$@"
{code}
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:
{code}
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)
{code}
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:
{code}
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)
{code}
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
was:
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
> Using jboss-modules loading outside WildFly 12 is broken
> --------------------------------------------------------
>
> Key: WFLY-10199
> URL: https://issues.jboss.org/browse/WFLY-10199
> Project: WildFly
> Issue Type: Bug
> Affects Versions: 12.0.0.Final
> Reporter: Martin Perina
> 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:
> {code}
> 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 \
> "$@"
> {code}
> 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:
> {code}
> 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)
> {code}
> 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:
> {code}
> 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)
> {code}
> 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