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

lutoff
26.22.2007 52b62f8a044501659bde94107b32f0ea2aa328ba
fix issue #1813 (dsservice create-ads  doesn't work with userRoot backend)
1 files modified
24 ■■■■■ changed files
opends/src/server/org/opends/server/admin/client/cli/DsServiceCliMain.java 24 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/admin/client/cli/DsServiceCliMain.java
@@ -35,7 +35,9 @@
import org.opends.admin.ads.ADSContext;
import org.opends.admin.ads.ADSContextException;
import org.opends.admin.ads.util.ConnectionUtils;
import org.opends.server.admin.ClassLoaderProvider;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.InitializationException;
import org.opends.server.types.NullOutputStream;
import org.opends.server.util.args.ArgumentException;
@@ -287,6 +289,28 @@
    {
      // Bootstrap and initialize directory data structures.
      DirectoryServer.bootstrapClient();
      // Bootstrap definition classes.
      try
      {
        ClassLoaderProvider.getInstance().enable();
      }
      catch (InitializationException e)
      {
        int msgID = MSGID_ADMIN_CANNOT_CONNECT_TO_ADS;
        String message = getMessage(msgID, host);
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return ReturnCode.CANNOT_CONNECT_TO_ADS.getReturnCode();
      }
      catch (IllegalStateException e)
      {
        int msgID = MSGID_ADMIN_CANNOT_CONNECT_TO_ADS;
        String message = getMessage(msgID, host);
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return ReturnCode.CANNOT_CONNECT_TO_ADS.getReturnCode();
      }
    }
    // perform the subCommand