Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-1574

dsconfig throws an exception when editing single-valued ip-address properties

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 3.0.0, 2.8.0, 2.6.2
    • Component/s: tools
    • Labels:

      Description

      Editing multi-valued ip-address properties (e.g. ds-cfg-listen-address) works OK. However editing a single-valued ip-address property fails straight after pressing enter after the new value with this exception:

      Exception in thread "main" java.lang.ClassCastException: java.net.Inet4Address cannot be cast to java.lang.Comparable
      	at java.util.TreeMap.compare(TreeMap.java:1290)
      	at java.util.TreeMap.put(TreeMap.java:538)
      	at java.util.TreeSet.add(TreeSet.java:255)
      	at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
      	at java.util.TreeSet.addAll(TreeSet.java:312)
      	at java.util.TreeSet.<init>(TreeSet.java:160)
      	at org.opends.server.tools.dsconfig.PropertyValueEditor$SingleValuedPropertyEditor.runMenu(PropertyValueEditor.java:1984)
      	at org.opends.server.tools.dsconfig.PropertyValueEditor$SingleValuedPropertyEditor.visitUnknown(PropertyValueEditor.java:1860)
      	at org.opends.server.tools.dsconfig.PropertyValueEditor$SingleValuedPropertyEditor.visitUnknown(PropertyValueEditor.java:1583)
      	at org.opends.server.admin.PropertyDefinitionVisitor.visitIPAddress(PropertyDefinitionVisitor.java:221)
      	at org.opends.server.admin.IPAddressPropertyDefinition.accept(IPAddressPropertyDefinition.java:165)
      	at org.opends.server.tools.dsconfig.PropertyValueEditor$SingleValuedPropertyEditor.invoke(PropertyValueEditor.java:1616)
      	at org.opends.server.util.cli.MenuBuilder$MenuImpl.run(MenuBuilder.java:294)
      	at org.opends.server.tools.dsconfig.PropertyValueEditor.edit(PropertyValueEditor.java:2370)
      	at org.opends.server.tools.dsconfig.SetPropSubCommandHandler.modifyManagedObject(SetPropSubCommandHandler.java:281)
      	at org.opends.server.tools.dsconfig.SetPropSubCommandHandler.run(SetPropSubCommandHandler.java:863)
      	at org.opends.server.tools.dsconfig.DSConfig$SubCommandHandlerMenuCallback.invoke(DSConfig.java:131)
      	at org.opends.server.util.cli.MenuBuilder$MenuImpl.run(MenuBuilder.java:294)
      	at org.opends.server.tools.dsconfig.DSConfig$SubMenuCallback.invoke(DSConfig.java:264)
      	at org.opends.server.util.cli.MenuBuilder$MenuImpl.run(MenuBuilder.java:294)
      	at org.opends.server.tools.dsconfig.DSConfig.runInteractiveMode(DSConfig.java:971)
      	at org.opends.server.tools.dsconfig.DSConfig.run(DSConfig.java:842)
      	at org.opends.server.tools.dsconfig.DSConfig.main(DSConfig.java:358)
      	at org.opends.server.tools.dsconfig.DSConfig.main(DSConfig.java:314)
      

      Similarly for an Inet6Address.

      What is strange is that in both single- and multi-value cases we need a TreeSet<T> that contains an Inet4Address object, but in the multi-value case this can be created!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cjr Chris Ridd
                Reporter:
                cjr Chris Ridd
                QA Assignee:
                Ondrej Fuchsik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: