glassfish
  1. glassfish
  2. GLASSFISH-17014

GUI doesn't show the # of updates and gives wrong info in server.log

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.1_b08
    • Fix Version/s: 3.1.1_b12, 4.0_b08
    • Component/s: admin_gui
    • Labels:
      None

      Description

      After launching GUI, there is always the WARNING that looks something like this:

      [#|2011-07-11T11:49:47.432-0700|WARNING|glassfish3.1|org.glassfish.admingui|_ThreadID=23;_ThreadName=Thread-56;|Cannot create update center Image for /export/Sun/3.1.1/b10; Update Center functionality will not be available in Admin Console|#]

      This is giving wrong information, the update center image has already been created.
      The # of updates that should show up in the GUI header doesn't show up until user goes to the Update Center tabs in the GUI.

        Activity

        Hide
        Anissa Lam added a comment - - edited

        We have a separate thread that does this after GUI is launched.
        What happens is that the update center image was created correctly, however, when trying to update the session Map with to indicate that the image catalog has been refreshed, the request may have been completed, and thus cannot get to the sessionMap.
        The code hasn't changed although i am seeing the issue on 3.1.1. Maybe due to timing.

        Why fix this issue in 3.1.1?

        • A major feature in GUI to inform user that update is available.

        Which is the targeted build of 3.1.1 for this fix?

        • fix is ready, so, the next build.

        Do regression tests exist for this issue?

        • no. need manual testing.

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

        • ensure there is no such WARNING and that update count shows up correctly in the header.
        
        ~/Awork/V3/v3.1.1/3.1.1/admingui/updatecenter 21)  svn diff
        Index: src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java
        ===================================================================
        --- src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java	(revision 47950)
        +++ src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java	(working copy)
        @@ -635,11 +635,11 @@
                 try{
                     image = new Image (new File (ucDir));
                     if (force || (GuiUtil.getSessionValue(CATALOG_REFRESHED) == null)){
        +                image.refreshCatalogs();
                         GuiUtil.setSessionValue(CATALOG_REFRESHED, "TRUE");
        -                image.refreshCatalogs();
                     }
                 }catch(Exception ex){
        -            if(force){
        +            if(force && (image==null)){
                         GuiUtil.getLogger().warning(GuiUtil.getMessage(BUNDLE, "NoImage", new String[]{ucDir}));
                     }
                 }
        
        Show
        Anissa Lam added a comment - - edited We have a separate thread that does this after GUI is launched. What happens is that the update center image was created correctly, however, when trying to update the session Map with to indicate that the image catalog has been refreshed, the request may have been completed, and thus cannot get to the sessionMap. The code hasn't changed although i am seeing the issue on 3.1.1. Maybe due to timing. Why fix this issue in 3.1.1? A major feature in GUI to inform user that update is available. Which is the targeted build of 3.1.1 for this fix? fix is ready, so, the next build. Do regression tests exist for this issue? no. need manual testing. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? ensure there is no such WARNING and that update count shows up correctly in the header. ~/Awork/V3/v3.1.1/3.1.1/admingui/updatecenter 21) svn diff Index: src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java =================================================================== --- src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java (revision 47950) +++ src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java (working copy) @@ -635,11 +635,11 @@ try { image = new Image ( new File (ucDir)); if (force || (GuiUtil.getSessionValue(CATALOG_REFRESHED) == null )){ + image.refreshCatalogs(); GuiUtil.setSessionValue(CATALOG_REFRESHED, "TRUE" ); - image.refreshCatalogs(); } } catch (Exception ex){ - if (force){ + if (force && (image== null )){ GuiUtil.getLogger().warning(GuiUtil.getMessage(BUNDLE, "NoImage" , new String []{ucDir})); } }
        Hide
        Anissa Lam added a comment -

        Fix checked into both trunk & 3.1.1 branch.

        Log Message:
        ------------
        GLASSFISH-17014; fix incorrect WARNING message about cannot create image.

        Revisions:
        ----------
        47998

        Modified Paths:
        ---------------
        branches/3.1.1/admingui/updatecenter/src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java

        ============================
        Revisions:
        ----------
        48000

        Modified Paths:
        ---------------
        trunk/v3/admingui/updatecenter/src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java

        Show
        Anissa Lam added a comment - Fix checked into both trunk & 3.1.1 branch. Log Message: ------------ GLASSFISH-17014 ; fix incorrect WARNING message about cannot create image. Revisions: ---------- 47998 Modified Paths: --------------- branches/3.1.1/admingui/updatecenter/src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java ============================ Revisions: ---------- 48000 Modified Paths: --------------- trunk/v3/admingui/updatecenter/src/main/java/org/glassfish/uc/admingui/UpdateCenterHandlers.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: