mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
22.54.2007 b0bfe00aececf145d71563c25609450f7573b5de
Fix for issue 2618.

The problem is that the root server entry is not created by default (it is used by some parts of the code to know if the ADS was initialized or not). The fix consists of updating the ADSContext.registerServer method to check if the parent entry exists. The check is only applied here since this is a particular case (and by default this check is not required for other entries in the ADS).
1 files modified
6 ■■■■■ changed files
opends/src/ads/org/opends/admin/ads/ADSContext.java 6 ●●●●● patch | view | raw | blame | history
opends/src/ads/org/opends/admin/ads/ADSContext.java
@@ -420,6 +420,12 @@
    BasicAttributes attrs = makeAttrsFromServerProperties(serverProperties);
    try
    {
      // This check is required because by default the server container entry
      // does not exist.
      if (!isExistingEntry(nameFromDN(getServerContainerDN())))
      {
        createContainerEntry(getServerContainerDN());
      }
      dirContext.createSubcontext(dn, attrs).close();
      if (serverProperties.containsKey(
                                ServerProperty.INSTANCE_PUBLIC_KEY_CERTIFICATE))