Directory Browser advanced editor throws a NPE if you try to add an object of a custom object class if the schema for that objectclass has the SUP item before the DESC. For example: objectClasses: ( testschema-oid NAME 'testschema' SUP top DESC 'testschema' MUST ( cn ) X-ORIGIN 'testschema' ) java.lang.NullPointerException at com.netscape.admin.dirserv.propedit.DSEntryPanel.createActionPanel(Unknown Source) at com.netscape.admin.dirserv.propedit.DSEntryPanel.<init>(Unknown Source) at com.netscape.admin.dirserv.EntryEditor.doGenericDialog(Unknown Source) at com.netscape.admin.dirserv.EntryEditor.addGeneric(Unknown Source) at com.netscape.admin.dirserv.EntryEditor.createObject(Unknown Source) at com.netscape.admin.dirserv.DSContentPage.actionNewObject(Unknown Source) at com.netscape.admin.dirserv.DSContentPage.actionPerformed(Unknown Source) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.AbstractButton.doClick(AbstractButton.java:289) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113) at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943) at java.awt.Component.processMouseEvent(Component.java:5163) at java.awt.Component.processEvent(Component.java:4960) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3678) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3540) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3540) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
*** Bug 435646 has been marked as a duplicate of this bug. ***
*** Bug 462970 has been marked as a duplicate of this bug. ***
This is one of the consequences of https://bugzilla.redhat.com/show_bug.cgi?id=170791 If you add the following oc: objectClasses: ( 1.3.6.1.4.1.15953.9.2.1 NAME 'sudoRole' SUP top STRUCTURAL DESC 'Sudoer Entries' MUST ( cn ) MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoOption $ description ) X-ORIGIN 'SUDO' ) If you look at the entry over LDAP you see something like this: objectClasses: ( 1.3.6.1.4.1.15953.9.2.1 NAME 'sudoRole' DESC 'Sudoer Entries' STRUCTURAL MUST cn MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ su doOption $ description ) X-ORIGIN ( 'SUDO' 'user defined' ) ) Note that the entry read over LDAP does not have SUP top. This confuses the console. I think the solution is to always add top to structural objectclasses.
*** Bug 229693 has been marked as a duplicate of this bug. ***
Created attachment 325922 [details] diffs
Created attachment 325941 [details] cvs commit log Reviewed by: nkinder (Thanks!) Fix Description: The problem is primarily due to https://bugzilla.redhat.com/show_bug.cgi?id=170791 "Schema file parsing overly picky?" - the console schema editor expects an objectclass to always have at least 1 superior. The bug causes SUP not to be present in the schema entry in the directory server. The fix is to use a schema helper function to make sure the list of superior objectclasses always contains at least "top". I also added a check for a null value to avoid the NullPointerException console error. Platforms tested: RHEL5 Flag Day: no Doc impact: no
fix verified HP-UX and RHEL 4 - DS 8.1 The following added to user99.ldif and server restart objectClasses: ( testschema-oid NAME 'testschema' SUP top DESC '' STRUCTURAL M AY cn X-ORIGIN 'user defined' ) No NPE, can add user, advanced editor and add new objectclass without issue.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-0455.html