glassfish
  1. glassfish
  2. GLASSFISH-511

Deploy to Virtual Server without http-listener throws exception

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      511

      Description

      Where looking at issue#491, i saw this problem.
      I created a Virtual Server named "ABC". Since the http-listener is an optional
      attribute, i didn't fill that in. I know that may not make sense, but during
      creation i misssed that.

      Then i deploy hello.war to this virtual server "ABC". Comes back with an error
      asadmin> deploy --user admin --virtualservers ABC
      C:/Sun/AppServer/samples/quickstart/hello.war
      CLI171 Command deploy failed : Deploying application in domain failed; N/A

      Here is the entry for ABC in domain.xml
      <virtual-server hosts="$

      {com.sun.aas.hostName}

      " id="ABC"
      log-file="$

      {com.sun.aas.instanceRoot}/logs/server.log" state="on">
      <property name="docroot" value="${com.sun.aas.instanceRoot}

      /docroot"/>
      <property name="accesslog"
      value="$

      {com.sun.aas.instanceRoot}

      /logs/access"/>
      </virtual-server>

      In server.log

      [#|2006-03-30T13:29:53.203-0800|INFO|sun-appserver-pe9.0|javax.enterprise.system.tools.admin|_ThreadID=12;_ThreadName=httpWorkerThread-4848-1;C:\Documents
      and Settings\anilam\Local
      Settings\Temp\s1astempdomain1server-1642063806\hello.war;|ADM1006:Uploading the
      file to:[C:\Documents and Settings\anilam\Local
      Settings\Temp\s1astempdomain1server-1642063806\hello.war]|#]

      [#|2006-03-30T13:29:54.109-0800|WARNING|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Thread-26;_RequestID=f44ad863-db5e-435f-b67b-6701ca2ded8c;|mbean.deploy_failed

      com.sun.enterprise.admin.common.exception.ServerInstanceException

      at
      com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.getVirtualServerHostAndPort(DeploymentServiceUtils.java:1329)

      at
      com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.setHostAndPort(DeploymentServiceUtils.java:1076)

      at
      com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:738)

      at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)

      at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)

      #]

      If i filled in http-listener for this virtual server, then deployment went fine.

        Activity

        Hide
        Anissa Lam added a comment -

        Created an attachment (id=190)
        server.log

        Show
        Anissa Lam added a comment - Created an attachment (id=190) server.log
        Hide
        Hong Zhang added a comment -

        I will take a look.

        Show
        Hong Zhang added a comment - I will take a look.
        Hide
        Hong Zhang added a comment -

        I looked at the sun-domain_1_2.dtd regarding virtual server element, this is
        what is said about http-listeners attribute:

        http-listeners
        A comma-separated list of http-listener id(s), Required only
        for a Virtual Server that is not the default virtual server.

        So in this case for virtual server "ABC", the http-listeners attribute is required.

        However, the deployment code could be improved in two ways:
        1. the error message displayed in the admin-gui window doesn't say much about
        why it failed. We should chain the exception cause and display the error message
        to user.
        2. we call admin code to query attribute value. Admin code throws exception when
        this attribute does not exist. Maybe we could just catch this type of exception
        and proceed.

        Lower to P4 since this is not very common usecase. Will revisit in 9.1 and
        improve the above 2.

        Show
        Hong Zhang added a comment - I looked at the sun-domain_1_2.dtd regarding virtual server element, this is what is said about http-listeners attribute: http-listeners A comma-separated list of http-listener id(s), Required only for a Virtual Server that is not the default virtual server. So in this case for virtual server "ABC", the http-listeners attribute is required. However, the deployment code could be improved in two ways: 1. the error message displayed in the admin-gui window doesn't say much about why it failed. We should chain the exception cause and display the error message to user. 2. we call admin code to query attribute value. Admin code throws exception when this attribute does not exist. Maybe we could just catch this type of exception and proceed. Lower to P4 since this is not very common usecase. Will revisit in 9.1 and improve the above 2.
        Hide
        Hong Zhang added a comment -

        mark as duplicate of 3896

            • This issue has been marked as a duplicate of 3896 ***
        Show
        Hong Zhang added a comment - mark as duplicate of 3896 This issue has been marked as a duplicate of 3896 ***

          People

          • Assignee:
            Hong Zhang
            Reporter:
            Anissa Lam
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: