title: glassfish 3.1 virtual server nightmare
body: <p>I m using glassfish 3.1.1 (Edition 3.1 (build 43)) server. I have deployed a web application named <strong>"void"</strong>
  Now I have made a virtual server where in the hosts I have written</p>
  
  <pre><code>${com.sun.aas.hostName},pradyut.dyndns.org
  </code></pre>
  
  <p>in network listeners I have chosen </p>
  
  <pre><code>http-listener-1
  </code></pre>
  
  <p>in the default web module I have chosen the web applcation named <strong>"void"</strong></p>
  
  <p>Now there are two issues:</p>
  
  <p>1) Whenever I restart the server the http-sevice-1 goes offline and at every request dumps the stack trace: -</p>
  
  <pre><code>    SEVERE: PWC3989: An exception or error occurred in the container during the request processing
  java.lang.ClassCastException: com.sun.grizzly.config.ContextRootInfo cannot be cast to org.apache.catalina.Context
  at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:515)
  at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:267)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
  at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
  at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
  at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
  at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
  at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
  at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
  at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
  at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
  at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
  at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
  at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
  at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
  at java.lang.Thread.run(Thread.java:619)
  </code></pre>
  
  <p>The solution is to </p>
  
  <p>1) Undeploy the application void.</p>
  
  <p>2) Restart the server.</p>
  
  <p>3) Deploy application void</p>
  
  <p>This was not a problem in glassfish 3.0 without the clustering(as I remember).</p>
  
  <p>The second problem is whenever I make a virtual server I get the error:</p>
  
  <pre><code>    INFO: webContainer.virtual-server.loadedDefaultWebModule
  SEVERE: WEB0163: Exception processing HttpService configuration change
  org.apache.catalina.LifecycleException: java.lang.Exception: No context matching /void deployed on virtual server void
  at com.sun.enterprise.web.WebContainer.updateDefaultWebModule(WebContainer.java:2034)
  at com.sun.enterprise.web.WebContainer.updateHost(WebContainer.java:2916)
  at com.sun.enterprise.web.WebContainer.updateHttpService(WebContainer.java:3047)
  at com.sun.enterprise.web.reconfig.WebConfigListener$1.changed(WebConfigListener.java:159)
  at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:332)
  at com.sun.enterprise.web.reconfig.WebConfigListener.changed(WebConfigListener.java:114)
  at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:379)
  at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:369)
  at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:259)
  at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:257)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  at java.lang.Thread.run(Thread.java:619)
  Caused by: java.lang.Exception: No context matching /void deployed on virtual server void
  at com.sun.grizzly.util.http.mapper.Mapper.addDefaultContext(Mapper.java:795)
  at com.sun.grizzly.util.http.mapper.Mapper.setDefaultContextPath(Mapper.java:759)
  at com.sun.enterprise.web.WebContainer.updateDefaultWebModule(WebContainer.java:2026)
  ... 14 more
  </code></pre>
  
  <p>I have not got any solution to the virtual server nightmare.
  If you cannot replicate the above error, end the sever process from the OS task manager.
  then start and try.</p>
  
  <p>BTW how to issue a ticket in glassfish? where is glassfish bugzilla?</p>