glassfish
  1. glassfish
  2. GLASSFISH-19084

It's failed to delete the instance from GUI

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0_b53
    • Fix Version/s: None
    • Component/s: rest-interface
    • Labels:
      None
    • Environment:

      Can not delete the instance from GUI

      Description

      [Bug Description]
      It's failed in deleting instance from GUI and RuntimeException was thrown out.

      [Operations]
      STEP1: Create a cluster , then create instance on cluster.
      STEP2: Delete the instance from GUI "Clusters -> %NAME of the cluster% -> Instance".

      In STEP2, The message like "An error has occurred java.lang.RuntimeException:" was thrown out to the GUI, and the instance can not be deleted.

      [affected versions]
      1 4.0_b53
      2 gf's trunk until 2012/09/12

        Activity

        Hide
        zhouronghui added a comment - - edited

        I think it's caused by the NULL check was omitted in TemplateCommandDeleteResource#hack(ParameterMap data). I found that the NPE was thrown out to the server.log.

        Messages in C:\glassfish3\glassfish\domains\domain1\logs\server.log
        ============================================
        [#|2012-09-18T14:35:37.022+0900|SEVERE|44.0|org.glassfish.jersey.server.ApplicationHandler|_ThreadID=36;_ThreadName=admin-listener(16);|java.lang.NullPointerException
        org.glassfish.jersey.internal.MappableException: java.lang.NullPointerException
        at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:122)
        ~~~~ ommitted ~~~~
        at java.lang.Thread.run(Thread.java:662)
        Caused by: java.lang.NullPointerException
        at org.glassfish.admin.rest.resources.TemplateCommandDeleteResource.hack(TemplateCommandDeleteResource.java:127)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.glassfish.jersey.server.model.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:80)
        at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:113)
        ... 37 more
        ============================================

        BTW: I have modified the source and tested it. I have attetched the patch for this ISSUE, Would you please check it?

        Show
        zhouronghui added a comment - - edited I think it's caused by the NULL check was omitted in TemplateCommandDeleteResource#hack(ParameterMap data). I found that the NPE was thrown out to the server.log. Messages in C:\glassfish3\glassfish\domains\domain1\logs\server.log ============================================ [#|2012-09-18T14:35:37.022+0900|SEVERE|44.0|org.glassfish.jersey.server.ApplicationHandler|_ThreadID=36;_ThreadName=admin-listener(16);|java.lang.NullPointerException org.glassfish.jersey.internal.MappableException: java.lang.NullPointerException at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:122) ~~~~ ommitted ~~~~ at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at org.glassfish.admin.rest.resources.TemplateCommandDeleteResource.hack(TemplateCommandDeleteResource.java:127) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.jersey.server.model.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:80) at org.glassfish.jersey.server.model.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:113) ... 37 more ============================================ BTW: I have modified the source and tested it. I have attetched the patch for this ISSUE, Would you please check it?
        Hide
        Anissa Lam added a comment -

        I cannot reproduce with the lastest build.
        The patch seems reasonable, but this is in the REST module. so, I am transferring this to REST so Jason can take a look.

        Show
        Anissa Lam added a comment - I cannot reproduce with the lastest build. The patch seems reasonable, but this is in the REST module. so, I am transferring this to REST so Jason can take a look.
        Hide
        Jason Lee added a comment -

        Fix committed (r58902)

        Show
        Jason Lee added a comment - Fix committed (r58902)

          People

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

            Dates

            • Created:
              Updated:
              Resolved: