Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4.0
    • Component/s: Administration/GUI
    • Labels:
      None

      Description

      Issue description from Tom Price in the user mailing list:

      With the release of Java 7, I tried using Java 7 with OpenDS 2.3.0-build003. Setup worked correctly, and the server seemed to start and run correctly. However, the control-panel failed after I entered the bindDN and password. The pop-up window displayed, "An unexpected error occurred. Details: java.lang.NullPointerException".

      From the opends-control-panel-xxx.log, the traceback is:

      Aug 03, 2011 4:39:40 PM org.opends.guitools.controlpanel.util.ConfigFromFile readConfiguration

      WARNING: Error reading configuration: java.lang.NullPointerException

      java.lang.NullPointerException

      at org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor.compareTo(BaseDNDescriptor.java:147)

      at org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor.compareTo(BaseDNDescriptor.java:38)

      at java.util.TreeMap.compare(TreeMap.java:1188)

      at java.util.TreeMap.put(TreeMap.java:531)

      at java.util.TreeSet.add(TreeSet.java:255)

      at org.opends.guitools.controlpanel.util.ConfigFromFile.readConfiguration(ConfigFromFile.java:174)

      at org.opends.guitools.controlpanel.datamodel.ControlPanelInfo.regenerateDescriptor(ControlPanelInfo.java:604)

      at org.opends.guitools.controlpanel.ui.LocalOrRemotePanel$3.processBackgroundTask(LocalOrRemotePanel.java:575)

      at org.opends.guitools.controlpanel.ui.LocalOrRemotePanel$3.processBackgroundTask(LocalOrRemotePanel.java:641)

      at org.opends.guitools.controlpanel.util.BackgroundTaskThread.run(BackgroundTaskThread.java:64)

      Comparing the src.zip files released with Java 1.6 and Java 1.7, it appears this problem results from a change of behavior in java/util/TreeMap.java to correct bug 5045147.

      Java 1.6 code segment from TreeMap.java (about line 510):

      public V put(K key, V value) {

      Entry<K,V> t = root;

      if (t == null) {

      // TBD:

      // 5045147: (coll) Adding null to an empty TreeSet should

      // throw NullPointerException

      //

      // compare(key, key); // type check

      root = new Entry<K,V>(key, value, null);

      size = 1;

      modCount++;

      return null;

      ...

      Java 1.7 code segment from TreeMap.java (about line 528):

      public V put(K key, V value) {

      Entry<K,V> t = root;

      if (t == null) {

      **à compare(key, key); // type (and possibly null) check

      With Java 1.7, when the first BaseDNDescriptor is added in readConfiguration() , BaseDNDescriptor.compareTo() is now called. It attempts to compare BackendIDs, though they have not been set up yet.

        Activity

        Hide
        jvergara added a comment -

        Fix committed in revision 6686.

        Show
        jvergara added a comment - Fix committed in revision 6686.
        Hide
        viswamy2k added a comment -

        Could please let me know when this 2.4 will be released as we want to usee opends with jdk1.7

        Show
        viswamy2k added a comment - Could please let me know when this 2.4 will be released as we want to usee opends with jdk1.7

          People

          • Assignee:
            jvergara
            Reporter:
            jvergara
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: