Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-7493

system variable not working in resource-root of module.xml of EAP 7.4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • None
    • Modules
    • None
    • Hide
      • Create a custom module. Eg. for MariaDB datasource as given in Article . Test the datasource and make sure it is successfully working.
      • Edit the resource-root of the module.xml with system variable.Eg: <resource-root path="${echos.xsl.mapping.dir}"/>
      • Start JBoss EAP 7.4 with command: ./bin/standalone.sh -Dechos.xsl.mapping.dir = <path of jdbc driver>
      • JBoss EAP 7.4 will show errors about this datasource at the startup.
      • Try the above procedure with JBoss EAP 8.1.3 and there will be no errors. EAP will start successfully. - change will be required in the dependencies of module.xml as below with respect to EAP 8.1.3
        <module name="wildflyee.api"/>
        <module name="jakarta.transaction.api"/>
      Show
      Create a custom module. Eg. for MariaDB datasource as given in Article . Test the datasource and make sure it is successfully working. Edit the resource-root of the module.xml with system variable.Eg: <resource-root path="${echos.xsl.mapping.dir}"/> Start JBoss EAP 7.4 with command: ./bin/standalone.sh -Dechos.xsl.mapping.dir = <path of jdbc driver> JBoss EAP 7.4 will show errors about this datasource at the startup. Try the above procedure with JBoss EAP 8.1.3 and there will be no errors. EAP will start successfully. - change will be required in the dependencies of module.xml as below with respect to EAP 8.1.3 <module name="wildflyee.api"/> <module name="jakarta.transaction.api"/>

      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.

              ropalka Richard Opalka
              rhn-support-yvedpath Yogesh Vedpathak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: