glassfish
  1. glassfish
  2. GLASSFISH-18107

error message appearing after 'save' of new jdbc connection pool or resource

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2_b16
    • Fix Version/s: 3.1.2_b17, 4.0_b21
    • Component/s: admin_gui
    • Labels:
      None
    • Environment:

      windows 7, jdk 7u2, x64.

      Description

      did a fresh install of glassfish 3.1.2 b16.

      manually added the latest jdbc4 driver jar for postgresql to the domain

      {x}

      /lib directory then started the domain.

      proceeded to add a JDBC Connection Pool, and after the initial 'save' button usage, was presented with (in the right hand pane) 'class java.lang.RuntimeException'.

      I did find that the settings had been saved, however.

      I proceeded to add a JDBC Resource for the newly added pool, and, upon using the 'save' button, was again rewarded with the same message being displayed.

      Again, the pool definition did appear to have been saved.

      I have attached the log file.

        Issue Links

          Activity

          Hide
          Anissa Lam added a comment - - edited
          • What is the impact on the customer of the bug?
            User will not be able to save any property tables.
          • What is the cost/risk of fixing the bug?
            2 hours. Test and ensure the object type is a Map.
          • Is there an impact on documentation or message strings?
            No.
          • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
            Test to ensure that password is still masked when logged in server.log. Also verify that page with Property table can be saved properly.
          • Which is the targeted build of 3.1.2 for this fix?
            3.1.2_b17

          Index: src/main/java/org/glassfish/admingui/common/util/RestUtil.java
          ===================================================================
          — src/main/java/org/glassfish/admingui/common/util/RestUtil.java (revision 51836)
          +++ src/main/java/org/glassfish/admingui/common/util/RestUtil.java (working copy)
          @@ -220,6 +220,9 @@

          private static Map maskOffPassword(Map<String, Object> attrs){
          Map masked = new HashMap();
          + if (attrs == null)

          { + return masked; + }

          for(String key : attrs.keySet()){
          if (pswdAttrList.contains(key.toLowerCase())){
          @@ -307,7 +310,10 @@
          // Parse the response
          String message = "";
          ExitCode exitCode = ExitCode.FAILURE;

          • Map maskedAttr = maskOffPassword((Map<String, Object>)attrs);
            + Object maskedAttr = attrs;
            + if ((attrs != null) && (attrs instanceof Map)) { + maskedAttr = maskOffPassword((Map<String, Object>)attrs); + }

            if (response != null) {
            try {
            int status = response.getResponseCode();

          Show
          Anissa Lam added a comment - - edited What is the impact on the customer of the bug? User will not be able to save any property tables. What is the cost/risk of fixing the bug? 2 hours. Test and ensure the object type is a Map. Is there an impact on documentation or message strings? No. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Test to ensure that password is still masked when logged in server.log. Also verify that page with Property table can be saved properly. Which is the targeted build of 3.1.2 for this fix? 3.1.2_b17 Index: src/main/java/org/glassfish/admingui/common/util/RestUtil.java =================================================================== — src/main/java/org/glassfish/admingui/common/util/RestUtil.java (revision 51836) +++ src/main/java/org/glassfish/admingui/common/util/RestUtil.java (working copy) @@ -220,6 +220,9 @@ private static Map maskOffPassword(Map<String, Object> attrs){ Map masked = new HashMap(); + if (attrs == null) { + return masked; + } for(String key : attrs.keySet()){ if (pswdAttrList.contains(key.toLowerCase())){ @@ -307,7 +310,10 @@ // Parse the response String message = ""; ExitCode exitCode = ExitCode.FAILURE; Map maskedAttr = maskOffPassword((Map<String, Object>)attrs); + Object maskedAttr = attrs; + if ((attrs != null) && (attrs instanceof Map)) { + maskedAttr = maskOffPassword((Map<String, Object>)attrs); + } if (response != null) { try { int status = response.getResponseCode();
          Hide
          Anissa Lam added a comment -

          28) svn commit
          Sending common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java
          Transmitting file data .
          Committed revision 51859.

          Show
          Anissa Lam added a comment - 28) svn commit Sending common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java Transmitting file data . Committed revision 51859.
          Hide
          Anissa Lam added a comment -

          Also fixed in the trunk.

          Revisions:
          ----------
          52218
          Modified Paths:
          ---------------
          trunk/main/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java

          Show
          Anissa Lam added a comment - Also fixed in the trunk. Revisions: ---------- 52218 Modified Paths: --------------- trunk/main/appserver/admingui/common/src/main/java/org/glassfish/admingui/common/util/RestUtil.java

            People

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

              Dates

              • Created:
                Updated:
                Resolved: