Package com.orientechnologies.orient.core.exception

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


        else if (type.equals("LOGICAL"))
          clusterId = database.addLogicalCluster(name, database.getClusterIdByName(OStorage.CLUSTER_INTERNAL_NAME));
      }

      if (clusterId != id)
        throw new OConfigurationException("Imported cluster '" + name + "' has id=" + clusterId + " different from the original: "
            + id);

      listener.onMessage("OK, assigned id=" + clusterId);

      total++;
View Full Code Here


      throw new IllegalArgumentException("Index type is null");

    final Class<? extends OIndex> indexClass = registry.get(iIndexType);

    if (indexClass == null)
      throw new OConfigurationException("Index type '" + iIndexType + "' is not configured");

    try {
      final OIndex index = indexClass.newInstance();
      return (T) index;
    } catch (Exception e) {
      throw new OConfigurationException("Can't create index type '" + iIndexType + "'", e);
    }
  }
View Full Code Here

  private final String        authentication;

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

    userName = "";
    String userpassword = "";
    for (OServerEntryConfiguration conf : iConfig.parameters) {
      if (conf.name.equals(USERNAME_CONF))
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

        registerPojo(pojo, record);

        stream2pojo(record, pojo, iFetchPlan);

      } catch (Exception e) {
        throw new OConfigurationException("Can't retrieve pojo from the record " + record, e);
      }
    }

    return (T) pojo;
  }
View Full Code Here

        return OStreamSerializerRID.INSTANCE;

      else if (iName.equals(OStreamSerializerListRID.NAME))
        return OStreamSerializerListRID.INSTANCE;

      throw new OConfigurationException("Stream Serializer '" + iName + "' not registered");

    } catch (Exception e) {
      throw new OConfigurationException("Error on the retrieving of Stream Serializer '" + iName + "'", e);
    }
  }
View Full Code Here

    try {
      T result = (T) iClass.newInstance();
      result.setDatabase(iDatabase);
      return result;
    } catch (Exception e) {
      throw new OConfigurationException("Error on the creation of the record of class " + iClass, e);
    }
  }
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

      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

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.