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

module.path of embedded server cannot be modified after it is set

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Not a Bug
    • 5.0.0.Beta5
    • None
    • Embedded
    • None
    • Hide
      java -jar jboss-cli-client.jar
      embed-server --jboss-home=/home/eduda/Projects/wildfly/dist/target/wildfly-A
      stop-embedded-server
      $ rm -rf /home/eduda/Projects/wildfly/dist/target/wildfly-A
      embed-server --jboss-home=/home/eduda/Projects/wildfly/dist/target/wildfly-B
      
      Cannot start embedded server: The first directory of the specified module path /home/eduda/Projects/wildfly/dist/target/wildfly-A/modules is invalid or does not exist.
      
      Show
      java -jar jboss-cli-client.jar embed-server --jboss-home=/home/eduda/Projects/wildfly/dist/target/wildfly-A stop-embedded-server $ rm -rf /home/eduda/Projects/wildfly/dist/target/wildfly-A embed-server --jboss-home=/home/eduda/Projects/wildfly/dist/target/wildfly-B Cannot start embedded server: The first directory of the specified module path /home/eduda/Projects/wildfly/dist/target/wildfly-A/modules is invalid or does not exist.
    • Regression

    Description

      Scenario:

      • Run CLI in non-modular class loading mode.
      • Run embed-server with --jboss-home pointing to server A
      • Stop embed-server
      • Remove server A
      • Run embed-server with --jboss-home pointing to server B

      Expectation: embed-server with --jboss-home pointing to server B will boot.

      Reality: The following error message is thrown. As you can see the embed server tries to load modules from server A directory even if the jboss-home was set to server B.

      Cannot start embedded server: The first directory of the specified module path /home/eduda/Projects/wildfly/dist/target/wildfly-A/modules is invalid or does not exist.
      

      Users impact: Behavior of non-modular class loading [1] has changed. This change can break user's automation or tests.

      Blocker priority was chosen because this is change in behavior against Wildfly 12.

      Technical details

      When the embed-server is started for the second time, following warning is logged.

      2018-05-28 08:10:57,621 WARN  [org.jboss.as.embedded] (main) WFLYEMB0145: The module loader has already been configured. Changing the module.path property will have no effect
      

      It seems that the change in behavior was caused by commit [2].

      [1] http://wildfly.org/news/2015/03/13/Offline-CLI/#classloading
      [2] https://github.com/wildfly/wildfly-core/commit/22f3956f1adcdf8b1cb11e24f2b904dd4e900429

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              eduda_jira Erich Duda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: