glassfish
  1. glassfish
  2. GLASSFISH-10385

[Embedded] deploy fails without warning on no virtual server

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: V3
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      10,385

      Description

      When a war is being deployed in embedded gf and no virtualservers field is used
      in DeployParams, the deploy will fail without providing SEVERE or WARNING.
      The following line is printed:
      INFO: webcontainer.webModuleNotLoadedNoVirtualServers
      This is printed by com.sun.enterprise.web.WebContainer.loadWebModule (around
      line 1498) since wmInfo.getVirtualServers() is empty.

      From the output, you get the impression that deployment succeeded:
      Oct 18, 2009 5:08:16 PM com.sun.enterprise.web.WebApplication start
      INFO: Loading application HelloEmbedded at /HelloEmbedded
      EmbeddedDeployer.deploy() returns a String, as can be expected on successful
      deployment.

      Solution: provide virtualservers in DeployParams.
      deployParams.virtualservers="server";

      I think it might be better that if no virtualservers are specified, the default
      one should be used. Or at least an error should be printed, not giving the user
      the impression that deployment succeeded.

      Related to #10301, but no NPE is thrown in this case.

        Activity

        Hide
        Alexis MP added a comment -

        Assigning to Siraj

        Show
        Alexis MP added a comment - Assigning to Siraj
        Show
        Alexis MP added a comment - See also https://glassfish.dev.java.net/issues/show_bug.cgi?id=10301
        Hide
        Hong Zhang added a comment -

        I think this is related to the recent check ins for
        https://glassfish.dev.java.net/issues/show_bug.cgi?id=6645

        Instead of the web container trying to interpret null virtual server to all
        virtual servers, now the calling code needs to set the virtual server explicitly
        (if null, using config information to figure out applicable virtual servers). We
        did this for DeployCommand path, but there are two other scenarios do not go
        through DeployCommand (embedded and command line deployment).

        We can put in something similar in the two code paths as what we did in
        DeployCommand, but I want to talk with Jan first to see if there are better ways
        to fix this (Jan will be back from vacation Tuesday).

        Assign the bug to myself first.

        Show
        Hong Zhang added a comment - I think this is related to the recent check ins for https://glassfish.dev.java.net/issues/show_bug.cgi?id=6645 Instead of the web container trying to interpret null virtual server to all virtual servers, now the calling code needs to set the virtual server explicitly (if null, using config information to figure out applicable virtual servers). We did this for DeployCommand path, but there are two other scenarios do not go through DeployCommand (embedded and command line deployment). We can put in something similar in the two code paths as what we did in DeployCommand, but I want to talk with Jan first to see if there are better ways to fix this (Jan will be back from vacation Tuesday). Assign the bug to myself first.
        Hide
        Hong Zhang added a comment -

        adding jan to cc

        Show
        Hong Zhang added a comment - adding jan to cc
        Hide
        Amy Roh added a comment -
            • Issue 10305 has been marked as a duplicate of this issue. ***
        Show
        Amy Roh added a comment - Issue 10305 has been marked as a duplicate of this issue. ***
        Hide
        Amy Roh added a comment -

        Cc amyroh

        Show
        Amy Roh added a comment - Cc amyroh
        Hide
        Hong Zhang added a comment -

        Moved the logic of getting virtual server when it's not set by user from
        DeployCommand to ApplicationLifecycle so all the code paths would work.

        Show
        Hong Zhang added a comment - Moved the logic of getting virtual server when it's not set by user from DeployCommand to ApplicationLifecycle so all the code paths would work.
        Hide
        Hong Zhang added a comment -

        correct the integrated build

        Show
        Hong Zhang added a comment - correct the integrated build

          People

          • Assignee:
            Hong Zhang
            Reporter:
            johanvos
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: