2 Replies Latest reply on Nov 5, 2018 5:30 AM by Lennart Olsson

    How can configure Wildfly 14's module path?

    Lennart Olsson Newbie

      How can I control the path where modules are located with Wildfly14?   The environment variable JBOSS_MODULEPATH  have no effect with Wildfly 14.  
      I have a jboss-cli script that installs the oracle driver that looks like:

      module add --name=com.oracle.ojdbc8 --resources=/tmp/ojdbc8.jar --dependencies=javax.api,javax.transaction.api,javax.resource.api

       

      The module gets installed under the $JBOSS_HOME/modules/  but I want to control where the module gets installed since I am running several standalone instances that share the same JBOSS_HOME.

      I have set the environment variable

      JBOSS_MODULEPATH=/jboss/server/modules:/opt/wildfly14/modules.

      JBOSS_HOME=/opt/wildfly14/

       

      I am upgrading an application from Wildfly 10 to Wildfly 14 and with Wildfly 10 I can control the path where the modules are located.

        • 1. Re: How can configure Wildfly 14's module path?
          simkam Novice

          Hi,

           

          are you sure it works with WildFly 10? As far I can say JBOSS_MODULEPATH behaves the same with WildFly 10 and WildFly 14. It's "module add" command that doesn't take JBOSS_MODULEPATH variable into account. Since WildFly 11 you can use additional parameter "--module-root-dir=<path>" to specify where the module will be created.

           

          module add --name=com.oracle.ojdbc8 --resources=/tmp/ojdbc8.jar --dependencies=javax.api,javax.transaction.api,javax.resource.api --module-root-dir=<path>

          • 2. Re: How can configure Wildfly 14's module path?
            Lennart Olsson Newbie

            Thanks!  Using "module add"  with the parameter "--module-root--dir=<path> solves the problem.

             

            Yes you are also right about JBOSS_MODULEPATH.  It works the same in Wildfly-10 and Wildfly-14 when it comes to how Wildfly locates the modules that are installed.  The problem I had was that the jboss-cli script "module add" no longer takes the JBOSS_MODULEPATH.