Issue Details (XML | Word | Printable)

Key: OPENDS-4608
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: jvergara
Reporter: jvergara
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
opends

Control Panel fails using JDK 1.7

Created: 04/Aug/11 07:41 AM   Updated: 25/Oct/12 10:12 AM   Resolved: 04/Aug/11 10:12 AM
Component/s: Administration/GUI
Affects Version/s: 2.3
Fix Version/s: 2.4.0

Time Tracking:
Not Specified

Tags:
Participants: jvergara and viswamy2k


 Description  « Hide

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.



jvergara added a comment - 04/Aug/11 10:12 AM

Fix committed in revision 6686.


viswamy2k added a comment - 25/Oct/12 10:12 AM

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