3 Replies Latest reply on Jan 30, 2020 8:53 AM by jaikiran

    Wildfly 17.0.1 <deployements> node did'nt evaluate variables ?

    s.andre

      Hi,

       

      We migrating an application (Wildfly 9.0.2 + Java 7) to (Wildfly 17.0.1 + Java 11) and i see a notable difference in their standalone.xml configuration file:

       

      <deployments>
           <deployment name="example.ear" runtime-name="example.ear">
                  <fs-exploded path="/opt/wildfly-17.0.1.Final/standalone/deploy${myVar:}/example.ear"/>
             </deployment>
       </deployments>
      

       

      The ${myVar:} was sucessfully interpreted in wildfly 9.0.2 (whatever the variable was set or not) but in wildfly 17.0.1, it never interpret it and give us "FileNotFound" error...

       

      Is this behaviour a wanted one ?

       

      Best regards,

      Sébastien.

        • 1. Re: Wildfly 17.0.1 <deployements> node did'nt evaluate variables ?
          jaikiran

          Hello Sébastien, how and where are you setting the value for the myVar?

          • 2. Re: Wildfly 17.0.1 <deployements> node did'nt evaluate variables ?
            s.andre

            Hi,

             

            We call the shell standalone.bat (or standalone.sh) specifying in the command line a -DmyVar="xxxx"

             

            To notice, that the variable is also used in some other places inside the standalone.xml and the substitution works fine.

             

            By example;

             

            <subsystem xmlns="urn:jboss:domain:logging:7.0">

                        ...

                        <periodic-rotating-file-handler name="FILE" autoflush="true">

                            <formatter>

                                <named-formatter name="PATTERN"/>

                            </formatter>

                            <file relative-to="jboss.server.log.dir" path="server${myVar:}.log"/>

                            <suffix value=".yyyy-MM-dd"/>

                            <append value="true"/>

                        </periodic-rotating-file-handler>

                        ...

            </subsystem>

             

            And in the case of myvar was not set (because i failed to set it), the substitution engine should replace anyway the "${myVar:}" by ""

            • 3. Re: Wildfly 17.0.1 <deployements> node did'nt evaluate variables ?
              jaikiran

              If this was working in a previous version of WildFly and no longer works, then it's worth filing a JIRA so that someone can investigate this. Can you create a issue here - Red Hat Issue Tracker  and add all relevant details and point to this thread? Before doing so, can you please test this once with the latest released 19.0.0.Beta1 and see if it works there?