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

Editing an existing custom objectClass throws a ConflictingSchemaElementException exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.0.0, 3.5.0
    • Fix Version/s: 6.0.0
    • Component/s: tools
    • Labels:
    • Support Ticket IDs:
    • Sprint:
      DJ Sustaining Sprint 38

      Description

      Adding a new custom attribute to an existing custom objectClass throws a ConflictingSchemaElementException exception when there is no conflict.

      Testcase: Using the control-panel.

      • Add 4 number of custom attributes - mycustom1 through mycustom4.
      • Add a mycustomoc objectClass with a superior of inetOrgPerson and the above 4 attributes.
      • Create a new mycustom5 attribute.
      • Edit the existing mycustomoc class and add the mycustom5 attribute
      opendj; bin/$ ./control-panel -D "cn=Directory Manager" -j pass --trustAll
      
       Exception in thread "AWT-EventQueue-0" org.forgerock.opendj.ldap.schema.ConflictingSchemaElementException: Unable to register object class mycustomoc with the server schema because its OID mycustomoc-oid conflicts with the OID of an existing object class mycustomoc
      	at org.forgerock.opendj.ldap.schema.SchemaBuilder.addObjectClass(SchemaBuilder.java:2401)
      	at org.forgerock.opendj.ldap.schema.ObjectClass$Builder.addToSchema(ObjectClass.java:95)
      	at org.opends.guitools.controlpanel.ui.CustomObjectClassPanel.getNewObjectClass(CustomObjectClassPanel.java:967)
      	at org.opends.guitools.controlpanel.ui.CustomObjectClassPanel.saveChanges(CustomObjectClassPanel.java:790)
      	at org.opends.guitools.controlpanel.ui.CustomObjectClassPanel.access$100(CustomObjectClassPanel.java:89)
      	at org.opends.guitools.controlpanel.ui.CustomObjectClassPanel$2.actionPerformed(CustomObjectClassPanel.java:207)
      	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
      	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
      	at java.awt.Component.processMouseEvent(Component.java:6525)
      	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
      	at java.awt.Component.processEvent(Component.java:6290)
      	at java.awt.Container.processEvent(Container.java:2234)
      	at java.awt.Component.dispatchEventImpl(Component.java:4881)
      	at java.awt.Container.dispatchEventImpl(Container.java:2292)
      	at java.awt.Component.dispatchEvent(Component.java:4703)
      	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
      	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
      	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
      	at java.awt.Container.dispatchEventImpl(Container.java:2278)
      	at java.awt.Window.dispatchEventImpl(Window.java:2750)
      	at java.awt.Component.dispatchEvent(Component.java:4703)
      	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
      	at java.awt.EventQueue.access$500(EventQueue.java:97)
      	at java.awt.EventQueue$3.run(EventQueue.java:709)
      	at java.awt.EventQueue$3.run(EventQueue.java:703)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
      	at java.awt.EventQueue$4.run(EventQueue.java:731)
      	at java.awt.EventQueue$4.run(EventQueue.java:729)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
      

      Before adding mycustom5 attribute to the custom class

      opendj; schema/$ cat 99-user.ldif 
      dn: cn=schema
      objectClass: top
      objectClass: ldapSubentry
      objectClass: subschema
      cn: schema
      attributeTypes: ( mycustom1-oid NAME 'mycustom1' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      attributeTypes: ( mycustom2-oid NAME 'mycustom2' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      attributeTypes: ( mycustom3-oid NAME 'mycustom3' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      attributeTypes: ( mycustom4-oid NAME 'mycustom4' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      objectClasses: ( mycustomoc-oid NAME 'mycustomoc' SUP 2.16.840.1.113730.3.2.2 STRUCTURAL MAY ( 1.3.6.1.4.1.11.1.3.1.1.11 $ mycustom1-oid $ mycustom4-oid $ mycustom2-oid $ mycustom3-oid $ 1.3.6.1.4.1.453.16.2.103 $ 1.3.6.1.1.1.1.18 $ 2.5.21.6 ) X-SCHEMA-FILE '99-user.ldif' )
      modifiersName: cn=Directory Manager,cn=Root DNs,cn=config
      modifyTimestamp: 20160908204235Z
      

      After adding mycustom5 attribute to the custom class.

      Even though we get an exception, the mycustom5 attribute is added.

      opendj; schema/$ cat 99-user.ldif 
      dn: cn=schema
      objectClass: top
      objectClass: ldapSubentry
      objectClass: subschema
      cn: schema
      attributeTypes: ( mycustom1-oid NAME 'mycustom1' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      attributeTypes: ( mycustom2-oid NAME 'mycustom2' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      attributeTypes: ( mycustom3-oid NAME 'mycustom3' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      attributeTypes: ( mycustom4-oid NAME 'mycustom4' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      attributeTypes: ( mycustom5-oid NAME 'mycustom5' EQUALITY 2.5.13.2 ORDERING 2.5.13.3 SUBSTR 2.5.13.4 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 USAGE userApplications X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-APPROX '1.3.6.1.4.1.26027.1.4.1' X-SCHEMA-FILE '99-user.ldif' )
      objectClasses: ( mycustomoc-oid NAME 'mycustomoc' SUP 2.16.840.1.113730.3.2.2 STRUCTURAL MAY ( 1.3.6.1.4.1.11.1.3.1.1.11 $ mycustom1-oid $ mycustom4-oid $ mycustom2-oid $ mycustom3-oid $ 1.3.6.1.4.1.453.16.2.103 $ 1.3.6.1.1.1.1.18 $ 2.5.21.6 ) X-SCHEMA-FILE '99-user.ldif' )
      modifiersName: cn=Directory Manager,cn=Root DNs,cn=config
      modifyTimestamp: 20160908204251Z
      

      Attaching a screenshot of the control-panel showing it still thinks mycustom5 is not part of the mycustomoc class even after is has been added to the cn=schema/99user.ldif file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthew Matthew Swift
                Reporter:
                lee.trujillo Lee Trujillo
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: