5 Replies Latest reply on Aug 2, 2011 5:16 PM by Bill Robinson

    BLCLI - ServerGroup setDescription issue

      I am working on a script to update some ServerSmartGroup descriptions and the ServerGroup setDescription command is throwing an exception:

      Command execution failed. java.lang.UnsupportedOperationException: immutable.  This seems strange to have a setDescription command if it can't change the description, so I think I am missing something here.


      Does anyone know if there is a trick to using this command?  It is a released command, but this is my first time using it.  I'm using an 8.1 application server on Solaris 10 with an Oracle DB.


      I found another post with instructions on updating a Server's description through an undocumented method, which I tweaked slightly to try and make it work for server groups, but it didn't work.


      Here is how I am trying it now:

      blcli_execute ServerGroup groupNameToId "<full patch to group>"

      blcli_storeenv GROUPID

      blcli_execute ServerGroup setDescription $GROUPID "<new description>"


      Any help is greatly appreciated.




      Craig Ludlow

        • 1. Re: BLCLI - ServerGroup setDescription issue
          Bill Robinson

          Does the role you are running this as have permissions to modify the group object?


          What if you try:


          Blcli_execute ServerGroup groupNameToId $group

          Blcli_storeenv groupId

          Blcli_execute Group findById $groupId

          blcli_execute Group setDescription “Description”

          Blcli_execute Group update

          1 of 1 people found this helpful
          • 2. Re: BLCLI - ServerGroup setDescription issue

            I get the same error on the setDescription command.  Here is the ouptut:


            appserver% blcli_execute ServerGroup groupNameToId "/List"

            2117152appserver% blcli_storeenv GROUPID

            appserver% blcli_execute Group findById $GROUPID


            appserver% blcli_execute Group setDescription "New Description"

            Command execution failed. java.lang.UnsupportedOperationException: immutable

            appserver% blcli_execute Group update



            I am authenticating as BLAdmins and verified that BLAdmins has the correct permission on the group object.  I can change the description manually in the console via the Properties View.


            However, I think I figured out my issue.  My target object was a SmartServerGroup, not a ServerGroup. Not sure how I missed that earlier.  I blame it on being the end of a long week!


            I appreciate the help Bill.

            • 3. Re: BLCLI - ServerGroup setDescription issue
              Bill Robinson

              it shouldn't matter if it's a smart group, it's still a group - and there is a 'SmartGroup.setDescription' command that fails as well.

              • 4. Re: BLCLI - ServerGroup setDescription issue

                That's interesting... I retested and this is what I found:


                Against a Smart Server Group:

                ServerGroup.setDescription - fails with immutable error

                SmartGroup.setDescription - succeeds

                SmartServerGroup.setDescription - succeeds


                Against a (static) Server Group:

                ServerGroup.setDescription - succeeds

                SmartGroup.setDescription - fails, exception indicates failure because argument wrong type

                SmartServerGroup.setDescription - fails, exception indicates failure because argument wrong type


                Based on what you said, it sounds like there is a bug in the ServerGroup.setDescription command.  Does that sound right?  Also, my testing seems to have opposite results for the SmartGroup.setDescription command, as it is working properly for me against Smart Server Groups. 


                I could see where one might want the ServerGroup.setDescription to work against both smart and static server groups.  I see it as a very likely scenario where a mix of smart and static groups, and it would make it far easier to script if there was a common command to edit descriptions on both types.


                For what I was working on, the fact that ServerSmartGroup.setDescription works is sufficient.

                • 5. Re: BLCLI - ServerGroup setDescription issue
                  Bill Robinson

                  interesting.. the 'SmartGroup/SmartServerGroup.setDescription' are doing something different than I would have done.  this is the command sequence they are running:


                  SmartGroup.getGroupIdno input-