-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
None
-
None
Customer is using a system variable for resource-root in the module.xml of a custom module as below:
<resource-root path="${echos.xsl.mapping.dir}"/>
The value of echos.xsl.mapping.dir is passed as command line while starting JBoss EAP 7.4 like:
./bin/standalone.sh -Dechos.xsl.mapping.dir = F:/projects/xsl_mapping
Customer is getting errors as:
Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add resource root '${echos.xsl.mapping.dir}' at path '${echos.xsl.mapping.dir}'
(position: END_TAG seen ..../config/jbs"/>\r\n\t<resource-root path="${echos.xsl.mapping.dir}"/>... @5:50)
caused by: java.nio.file.NoSuchFileException: f:\projects\ESB-TRUNK\jboss\modules\com\fis\echos\configuration\main\${echos.xsl.mapping.dir}
The same setup works fine in EAP 8.1.3 on customer's side.
I have tested this in EAP 8.1.3 where it works successfully. But it does not works in EAP 7.4.23. However, I am getting bit different errors:
2026-02-03 11:54:50,488 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool – 41) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "mariadb")
]) - failure description: "WFLYJCA0041: Failed to load module for driver [com.mdb]"
Why this set up works in EAP 8.1.3 and does not works in EAP 7.4.23. As per this link: https://jboss-modules.github.io/jboss-modules/manual/#resource-root-element
There is no restriction of not using system variables in module.xml of custom module.
- is caused by
-
MODULES-419 Add capability to parse environment variables when providing a resource-root
-
- Resolved
-