Marina Vatkina wrote:
> Unfortunately I'm still getting 404 on the 2nd deploy if I don't
> change domain.xml. I can test the URL part only from home later tonight.
Thanks for trying ...
The patch is a step in the right direction, but unfortunately, there is more
work required.
Right now, when GrizzlyService starts, no virtual servers have been
created yet (they're only created when the web container starts, which
is later).
However, GrizzlyService.registerNetworkProxy() goes ahead and
registers all registered adapters as context endpoints with all
virtual servers (there is a comment in the code to the effect that this
needs to be revisited), treating every virtual server alias name as a
separate virtual server.
When you register a context with a virtual server *before* the virtual
server has been created and registered, the Mapper will go ahead and
create a dummy virtual server that is equal to the empty string ("").
This is also the root cause for
https://glassfish.dev.java.net/issues/show_bug.cgi?id=5483
("virtualservers doesn't work")
which shows this exception in the server.log
java.lang.ClassCastException: java.lang.String
at org.apache.catalina.connector.Request.getHost(Request.java:723)
which occurs when the empty string is cast to a "Host" object.
Jan