Package com.orientechnologies.orient.core.exception

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


            OConfigurationException.class);

      id = distributedNetworkListener.getInboundAddr().getHostName() + ":" + distributedNetworkListener.getInboundAddr().getPort();

    } catch (Exception e) {
      throw new OConfigurationException("Can't configure OrientDB Server as Cluster Node", e);
    }
  }
View Full Code Here


    if (dbPath == null) {
      // SEARCH IN DEFAULT DATABASE DIRECTORY
      dbPath = OSystemVariableResolver.resolveSystemVariables("${ORIENTDB_HOME}/databases/" + name + "/");
      File f = new File(dbPath + "default.odh");
      if (!f.exists())
        throw new OConfigurationException("Database '" + name + "' is not configured on server");

      dbPath = "local:${ORIENTDB_HOME}/databases/" + name;
    }

    return dbPath;
View Full Code Here

      configuration.dataSegments.add(conf);

      final int pos = registerDataSegment(conf);

      if (pos == -1)
        throw new OConfigurationException("Can't add segment " + conf.name + " because it's already part of current storage");

      dataSegments[pos].create(-1);
      configuration.update();

      return pos;
View Full Code Here

      long tot = 0;

      for (int i = 0; i < iClusterIds.length; ++i) {
        if (iClusterIds[i] >= clusters.length)
          throw new OConfigurationException("Cluster id " + iClusterIds[i] + "was not found");

        final OCluster c = clusters[iClusterIds[i]];
        if (c != null)
          tot += c.getEntries();
      }
View Full Code Here

    final int id;

    if (iCluster != null) {
      // CHECK FOR DUPLICATION OF NAMES
      if (clusterMap.containsKey(iCluster.getName()))
        throw new OConfigurationException("Can't add segment '" + iCluster.getName() + "' because it was already registered");
      // CREATE AND ADD THE NEW REF SEGMENT
      clusterMap.put(iCluster.getName(), iCluster);
      id = iCluster.getId();
    } else
      id = clusters.length;
View Full Code Here

          return (ORecordId) id;
        } else if (id instanceof Number) {
          // TREATS AS CLUSTER POSITION
          final OClass cls = iDb.getMetadata().getSchema().getClass(iPojo.getClass());
          if (cls == null)
            throw new OConfigurationException("Class " + iPojo.getClass() + " is not managed by current database");

          return new ORecordId(cls.getDefaultClusterId(), ((Number) id).longValue());
        } else if (id instanceof String)
          return new ORecordId((String) id);
      }
View Full Code Here

        if (m.getParameterTypes().length > 0)
          m.invoke(iPojo, iDocument);
        else
          m.invoke(iPojo);
      } catch (Exception e) {
        throw new OConfigurationException("Error on executing user callback '" + m.getName() + "' annotated with '"
            + iAnnotation.getSimpleName() + "'", e);
      }
  }
View Full Code Here

  public OMVRBTreePersistent<K, V> load() throws IOException {
    ((ORecordId) record.getIdentity()).clusterId = clusterId;
    ORawBuffer raw = storage.readRecord(null, (ORecordId) record.getIdentity(), null);

    if (raw == null)
      throw new OConfigurationException("Can't load map with id " + clusterId + ":" + record.getIdentity().getClusterPosition());

    record.setVersion(raw.version);

    fromStream(raw.buffer);
    return this;
View Full Code Here

      color = inStream.getAsBoolean();
      init();
      size = inStream.getAsInteger();

      if (size > pageSize)
        throw new OConfigurationException("Loaded index with page size setted to " + pageSize
            + " while the loaded was built with: " + size);

      // UNCOMPACT KEYS SEPARATELY
      serializedKeys = new int[pageSize];
      for (int i = 0; i < size; ++i) {
View Full Code Here

    if (engine == null) {
      try {
        engine = new GremlinScriptEngine();
      } catch (Throwable e) {
        throw new OConfigurationException("Error on loading Gremlin engine", e);
      }

      // TODO THIS COULD BE IMPROVED BY CREATING A ORIENT-GRAPH POOL (LIKE WITH OTHER DB TYPES) INSTEAD TO CREATE IT PER QUERY
      graph = new OrientGraph(iCurrentRecord.getDatabase().getURL());
      engine.getBindings(ScriptContext.ENGINE_SCOPE).put("g", graph);
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.