Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4571

Tomcat 7 Multi Aliases Problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • Trunk
    • Trunk
    • framework
    • Ubuntu

    Description

      I see Tomcat 7 give me a confusing about adding multiple aliases (virtual hosts) to a webapp. I am not sure if it a bug of Tomcat 7 because it cannot work if I add multiple virtual hosts to a webapp. It works for only the top (first) virtual host. For example:

      <webapp name="ecommerce"
      title="eCommerce"
      server="default-server"
      location="webapp/ecommerce"
      mount-point="/ecommerce"
      app-bar-display="false">
      <virtual-host host-name="localhost1"/>
      <virtual-host host-name="localhost2"/>
      </webapp>

      It will work only localhost1, localhost2 will not work. This is a log I got:

      Nov 18, 2011 5:45:32 PM org.apache.coyote.http11.AbstractHttp11Processor process
      SEVERE: Error processing request
      java.lang.ClassCastException: org.apache.tomcat.util.http.mapper.Mapper$Host cannot be cast to org.apache.catalina.Host
      at org.apache.catalina.connector.Request.getHost(Request.java:631)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:105)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
      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)

      Any idea?

      Regards,
      Chatree Srichart

      Attachments

        1. multiple_aliases.patch
          1 kB
          Chatree Srichart

        Activity

          People

            hansbak Hans Bakker
            chatree Chatree Srichart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4m
                4m
                Remaining:
                Remaining Estimate - 4m
                4m
                Logged:
                Time Spent - Not Specified
                Not Specified