java.lang.NullPointerException

Java.net JIRA | jvergara | 5 years ago
  1. 0

    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.

    Java.net JIRA | 5 years ago | jvergara
    java.lang.NullPointerException
  2. 0

    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.

    Java.net JIRA | 5 years ago | jvergara
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor.compareTo()
    2. org.opends.guitools
      BaseDNDescriptor.compareTo
      1. org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor.compareTo(BaseDNDescriptor.java:147)
      2. org.opends.guitools.controlpanel.datamodel.BaseDNDescriptor.compareTo(BaseDNDescriptor.java:38)
      2 frames
    3. Java RT
      TreeSet.add
      1. java.util.TreeMap.compare(TreeMap.java:1188)
      2. java.util.TreeMap.put(TreeMap.java:531)
      3. java.util.TreeSet.add(TreeSet.java:255)
      3 frames
    4. org.opends.guitools
      BackgroundTaskThread.run
      1. org.opends.guitools.controlpanel.util.ConfigFromFile.readConfiguration(ConfigFromFile.java:174)
      2. org.opends.guitools.controlpanel.datamodel.ControlPanelInfo.regenerateDescriptor(ControlPanelInfo.java:604)
      3. org.opends.guitools.controlpanel.ui.LocalOrRemotePanel$3.processBackgroundTask(LocalOrRemotePanel.java:575)
      4. org.opends.guitools.controlpanel.ui.LocalOrRemotePanel$3.processBackgroundTask(LocalOrRemotePanel.java:641)
      5. org.opends.guitools.controlpanel.util.BackgroundTaskThread.run(BackgroundTaskThread.java:64)
      5 frames