Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_b41
    • Component/s: admin_gui
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      Build Used:
      GF V3.1 nightly dated 11/16
      OS : windows7
      browser : IE7

      Created a a new JMS host with host as localhost and all others as default values.
      The new JMS host shows up in the left tree node and the right table.
      But when I tried to delete it got the following error in the console:

      DELETE
      http://localhost:4848/management/domain/configs/config/new-instance-config/jms-service/jms-host/test-host
      returned a response status of 400

      The server.log has the below Exception:
      [#|2010-11-16T13:37:48.889-0800|SEVERE|oracle-glassfish3.1|org.glassfish.admingu
      i|_ThreadID=17;_ThreadName=Thread-1;|Exception Occurred :
      java.lang.RuntimeException: DELETE http://localhost:4848/management/domain/confi
      gs/config/new-instance1-config/jms-service/jms-host/new-jms-host returned a resp
      onse status of 400
      at org.glassfish.admingui.common.util.RestUtil.checkStatusForSuccess(Res
      tUtil.java:678)
      at org.glassfish.admingui.common.util.RestUtil.delete(RestUtil.java:662)

      at org.glassfish.admingui.common.handlers.RestApiHandlers.deleteCascade(
      RestApiHandlers.java:258)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handl
      er.java:442)
      at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHa
      ndlers(LayoutElementBase.java:420)
      at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHa
      ndlers(LayoutElementBase.java:394)
      at com.sun.jsftemplating.layout.event.CommandActionListener.invokeComman
      dHandlers(CommandActionListener.java:150)
      at com.sun.jsftemplating.layout.event.CommandActionListener.processActio
      n(CommandActionListener.java:98)
      at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
      at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:
      769)
      at javax.faces.component.UICommand.broadcast(UICommand.java:300)
      at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:
      166)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)

      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
      259)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
      ionPhase.java:81)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:395)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java
      :1534)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:343)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:215)
      at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:215)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:279)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
      ava:655)
      at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipel
      ine.java:600)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESess
      ionLockingStandardPipeline.java:91)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:162)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.j
      ava:326)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:227)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container
      Mapper.java:228)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:8
      17)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFil
      ter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro
      tocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
      a:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav
      a:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java
      :79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT
      ask.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(AbstractThreadP
      ool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool
      .java:513)
      at java.lang.Thread.run(Thread.java:619)

        Issue Links

          Activity

          Hide
          Jason Lee added a comment -

          How bad is its impact? (Severity)
          Moderate. Users are unable to delete JMS hosts from the GUI, and may inadvertently delete Hosts from the wrong config.

          How often does it happen? (Frequency)
          Every time

          How much effort is required to fix it? (Cost)
          Very little

          What is the risk of fixing it? (Risk)
          Very little

          Does a work around for the issue exist? Can the workaround be reasonably employed by the end user?
          Yes. The user can delete hosts using the CLI

          If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes?
          Yes.

          Diff:

          Index: admin/rest/src/main/java/org/glassfish/admin/rest/generator/CommandResourceMetaData.java
          ===================================================================
          — admin/rest/src/main/java/org/glassfish/admin/rest/generator/CommandResourceMetaData.java (revision 44778)
          +++ admin/rest/src/main/java/org/glassfish/admin/rest/generator/CommandResourceMetaData.java (working copy)
          @@ -282,7 +282,7 @@

          {"JavaConfig", "generate-jvm-report", "GET", "generate-jvm-report", "Generate Report", "target=$grandparent"}

          ,

          {"JmsService", "list-jms-hosts", "GET", "list-jms-hosts", "list-jms-hosts"}

          ,

          {"JmsService", "list-jms-resources", "GET", "list-jms-resources", "list-jms-resources"}

          ,

          • {"JmsHost", "delete-jms-host", "DELETE", "delete-jms-host", "Delete JMS Host", "target=$parent"}

            ,
            +

            {"JmsHost", "delete-jms-host", "DELETE", "delete-jms-host", "Delete JMS Host", "id=$parent"}

            ,

            {"LbConfig", "create-http-lb-ref", "POST", "create-http-lb-ref", "create-http-lb-ref"}

            ,

            {"LbConfig", "create-http-listener", "POST", "create-http-listener", "create-http-listener"}

            ,

            {"LbConfig", "delete-http-lb-ref", "POST", "delete-http-lb-ref", "delete-http-lb-ref"}

            ,
            Index: admingui/jms-plugin/src/main/resources/jmsHostsTable.inc
            ===================================================================

              • admingui/jms-plugin/src/main/resources/jmsHostsTable.inc (revision 44778)
                +++ admingui/jms-plugin/src/main/resources/jmsHostsTable.inc (working copy)
                @@ -65,8 +65,13 @@
                <!command
                getUIComponent(clientId="$pageSession {configsTableRowGroupId}

                ", component=>$attribute

                {tableRowGroup});
                getSelectedSingleMapRows(TableRowGroup="${tableRowGroup}

                " selectedRows=>$attribute

                {selectedRows});
                - //deleteConfig(ConfigName="#{configName}", Type="#{type}", selectedRows="${selectedRows}

                ");

          • gf.deleteCascade(endpoint="# {pageSession.parentUrl}/#{pageSession.childType}", selectedRows="${selectedRows}");
            +
            + foreach (var="row" list="#{requestScope.selectedRows}") {
            + urlencode(value="#{row['name']}" result="#{requestScope.encodedName}");
            + gf.restRequest(endpoint="#{pageSession.parentUrl}

            /#

            {pageSession.childType}

            /#

            {requestScope.encodedName}

            ?target=#

            {pageSession.configName}

            ",
            + method="delete", result="#

            {pageSession.result}

            ");
            + }
            +
            setAttribute(key="selectedRows" value="$

            {selectedRows}

            ");
            gf.redirect(page="#

            {listPageLink}

            ?configName=#

            {configName}

            ");
            />

          Show
          Jason Lee added a comment - How bad is its impact? (Severity) Moderate. Users are unable to delete JMS hosts from the GUI, and may inadvertently delete Hosts from the wrong config. How often does it happen? (Frequency) Every time How much effort is required to fix it? (Cost) Very little What is the risk of fixing it? (Risk) Very little Does a work around for the issue exist? Can the workaround be reasonably employed by the end user? Yes. The user can delete hosts using the CLI If the issue is not fixed should the issue and its workaround (if applicable) be described in the Release Notes? Yes. Diff: Index: admin/rest/src/main/java/org/glassfish/admin/rest/generator/CommandResourceMetaData.java =================================================================== — admin/rest/src/main/java/org/glassfish/admin/rest/generator/CommandResourceMetaData.java (revision 44778) +++ admin/rest/src/main/java/org/glassfish/admin/rest/generator/CommandResourceMetaData.java (working copy) @@ -282,7 +282,7 @@ {"JavaConfig", "generate-jvm-report", "GET", "generate-jvm-report", "Generate Report", "target=$grandparent"} , {"JmsService", "list-jms-hosts", "GET", "list-jms-hosts", "list-jms-hosts"} , {"JmsService", "list-jms-resources", "GET", "list-jms-resources", "list-jms-resources"} , {"JmsHost", "delete-jms-host", "DELETE", "delete-jms-host", "Delete JMS Host", "target=$parent"} , + {"JmsHost", "delete-jms-host", "DELETE", "delete-jms-host", "Delete JMS Host", "id=$parent"} , {"LbConfig", "create-http-lb-ref", "POST", "create-http-lb-ref", "create-http-lb-ref"} , {"LbConfig", "create-http-listener", "POST", "create-http-listener", "create-http-listener"} , {"LbConfig", "delete-http-lb-ref", "POST", "delete-http-lb-ref", "delete-http-lb-ref"} , Index: admingui/jms-plugin/src/main/resources/jmsHostsTable.inc =================================================================== admingui/jms-plugin/src/main/resources/jmsHostsTable.inc (revision 44778) +++ admingui/jms-plugin/src/main/resources/jmsHostsTable.inc (working copy) @@ -65,8 +65,13 @@ <!command getUIComponent(clientId="$pageSession {configsTableRowGroupId} ", component=>$attribute {tableRowGroup}); getSelectedSingleMapRows(TableRowGroup="${tableRowGroup} " selectedRows=>$attribute {selectedRows}); - //deleteConfig(ConfigName="#{configName}", Type="#{type}", selectedRows="${selectedRows} "); gf.deleteCascade(endpoint="# {pageSession.parentUrl}/#{pageSession.childType}", selectedRows="${selectedRows}"); + + foreach (var="row" list="#{requestScope.selectedRows}") { + urlencode(value="#{row['name']}" result="#{requestScope.encodedName}"); + gf.restRequest(endpoint="#{pageSession.parentUrl} /# {pageSession.childType} /# {requestScope.encodedName} ?target=# {pageSession.configName} ", + method="delete", result="# {pageSession.result} "); + } + setAttribute(key="selectedRows" value="$ {selectedRows} "); gf.redirect(page="# {listPageLink} ?configName=# {configName} "); />
          Hide
          Anissa Lam added a comment -

          code reviewed. looks good to me.

          Show
          Anissa Lam added a comment - code reviewed. looks good to me.
          Hide
          Jason Lee added a comment -
          • How long has the bug existed in the product?

          I'm not sure. It's quite possible it has existed since multi-config support was introduced into 3.1.

          • Do regression tests exist for this issue?

          Not yet, but I will commit one with this dix.

          • Which tests should QA (re)run to validate the fix did not destabilize GlassFish?

          JavaMessageServiceTest and JmsResourcesTest should be sufficient.

          • When will a tested fix be ready for integration? (We know this)

          I have manually verified the fix from the patch above. An automated regression test will be added today.

          Show
          Jason Lee added a comment - How long has the bug existed in the product? I'm not sure. It's quite possible it has existed since multi-config support was introduced into 3.1. Do regression tests exist for this issue? Not yet, but I will commit one with this dix. Which tests should QA (re)run to validate the fix did not destabilize GlassFish? JavaMessageServiceTest and JmsResourcesTest should be sufficient. When will a tested fix be ready for integration? (We know this) I have manually verified the fix from the patch above. An automated regression test will be added today.
          Hide
          Jason Lee added a comment -

          Fix committed to trunk (r44801) and branch (r44800).

          Show
          Jason Lee added a comment - Fix committed to trunk (r44801) and branch (r44800).
          Hide
          shaline added a comment -

          Verified in promoted b43.

          Show
          shaline added a comment - Verified in promoted b43.

            People

            • Assignee:
              Jason Lee
              Reporter:
              shaline
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: