Package com.orientechnologies.orient.core.exception

Examples of com.orientechnologies.orient.core.exception.OConfigurationException


   * Rollbacks changes to the loaded version without reloading the document. Works only if tracking changes is enabled @see
   * {@link #isTrackingChanges()} and {@link #setTrackingChanges(boolean)} methods.
   */
  public ODocument undo() {
    if (!_trackingChanges)
      throw new OConfigurationException("Cannot undo the document because tracking of changes is disabled");

    for (Entry<String, Object> entry : _fieldOriginalValues.entrySet()) {
      final Object value = entry.getValue();
      if (value == null)
        _fieldValues.remove(entry.getKey());
View Full Code Here


        trustStoreType = param.value;
      }
    }

    if (keyStorePath == null) {
      throw new OConfigurationException("Missing parameter "
          + PARAM_NETWORK_SSL_KEYSTORE);
    } else if (keyStorePassword == null) {
      throw new OConfigurationException("Missing parameter "
          + PARAM_NETWORK_SSL_KEYSTORE_PASSWORD);
    }

    keyStoreFile = new File(keyStorePath);
    if (!keyStoreFile.isAbsolute()) {
View Full Code Here

      context.init(kmf.getKeyManagers(),
          (tmf == null ? null : tmf.getTrustManagers()), null);

      return context;
    } catch (Exception e) {
      throw new OConfigurationException("Failed to create SSL context", e);
    }
  }
View Full Code Here

  public ODocument getClusterConfiguration(String iClusterName) {
    synchronized (configuration) {
      final ODocument clusters = configuration.field("clusters");

      if (clusters == null)
        throw new OConfigurationException("Cannot find 'clusters' in distributed database configuration");

      if (iClusterName == null)
        iClusterName = "*";

      final ODocument cfg;
View Full Code Here

  public OServer startup(final InputStream iInputStream) throws InstantiationException, IllegalAccessException,
      ClassNotFoundException, IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException,
      IOException {
    if (iInputStream == null)
      throw new OConfigurationException("Configuration file is null");

    configurationLoader = new OServerConfigurationLoaderXml(OServerConfiguration.class, iInputStream);
    configuration = configurationLoader.load();

    // Startup function split to allow pre-activation changes
View Full Code Here

    if (dbURL == null) {
      // SEARCH IN DEFAULT DATABASE DIRECTORY
      if (new File(OIOUtils.getPathFromDatabaseName(dbPath) + "/default.pcl").exists())
        dbURL = "plocal:" + dbPath;
      else
        throw new OConfigurationException("Database '" + name + "' is not configured on server (home=" + getDatabaseDirectory()
            + ")");
    }

    return dbURL;
  }
View Full Code Here

      // REGISTER CURRENT MEMBERS
      setNodeStatus(NODE_STATUS.ONLINE);

    } catch (FileNotFoundException e) {
      throw new OConfigurationException("Error on creating Hazelcast instance", e);
    }
  }
View Full Code Here

        }

        try {
          serverInstance.saveConfiguration();
        } catch (IOException e) {
          throw new OConfigurationException("Cannot save server configuration", e);
        }
        break;
      }
    }
  }
View Full Code Here

      } else if (identityType.equals("role")) {
        final Set<ORole> roles = db.getUser().getRoles();
        if (!roles.isEmpty())
          identity = roles.iterator().next().getDocument();
      } else
        throw new OConfigurationException("Wrong custom field '" + OSecurityShared.ONCREATE_IDENTITY_TYPE + "' in class '"
            + cls.getName() + "' with value '" + identityType + "'. Supported ones are: 'user', 'role'");

      if (identity != null) {
        for (String f : fields)
          db.getMetadata().getSecurity().allowIdentity(iDocument, f, identity);
View Full Code Here

  private String             userPassword;

  public OServerCommandAuthProxy(OServerCommandConfiguration iConfig) {
    super(iConfig);
    if (iConfig.parameters.length != 3)
      throw new OConfigurationException("AuthProxy Command requires database access data.");

    userName = "";
    userPassword = "";
    for (OServerEntryConfiguration conf : iConfig.parameters) {
      if (conf.name.equals(USERNAME_CONF))
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.exception.OConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.