[GLASSFISH-10385] [Embedded] deploy fails without warning on no virtual server Created: 18/Oct/09  Updated: 27/Nov/10  Resolved: 20/Oct/09

Status: Resolved
Project: glassfish
Component/s: deployment
Affects Version/s: V3
Fix Version/s: V3

Type: Bug Priority: Major
Reporter: johanvos Assignee: Hong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: All

Issuezilla Id: 10,385


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

Solution: provide virtualservers in DeployParams.

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.

Comment by Alexis MP [ 19/Oct/09 ]

Assigning to Siraj

Comment by Alexis MP [ 19/Oct/09 ]

See also https://glassfish.dev.java.net/issues/show_bug.cgi?id=10301

Comment by Hong Zhang [ 19/Oct/09 ]

I think this is related to the recent check ins for

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.

Comment by Hong Zhang [ 19/Oct/09 ]

adding jan to cc

Comment by Amy Roh [ 19/Oct/09 ]
      • Issue 10305 has been marked as a duplicate of this issue. ***
Comment by Amy Roh [ 19/Oct/09 ]

Cc amyroh

Comment by Hong Zhang [ 19/Oct/09 ]

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.

Comment by Hong Zhang [ 20/Oct/09 ]

correct the integrated build

Generated at Thu Dec 08 11:28:59 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.