Package com.orientechnologies.orient.core.exception

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


  @SuppressWarnings("unchecked")
  public ORuntimeKeyIndexDefinition(final byte iId) {
    serializer = (OBinarySerializer<T>) OBinarySerializerFactory.getInstance().getObjectSerializer(iId);
    if (serializer == null)
      throw new OConfigurationException("Runtime index definition cannot find binary serializer with id=" + iId
          + ". Assure to plug custom serializer into the server.");
  }
View Full Code Here


  @Override
  protected void fromStream() {
    final byte keySerializerId = ((Number) document.field("keySerializerId")).byteValue();
    serializer = (OBinarySerializer<T>) OBinarySerializerFactory.getInstance().getObjectSerializer(keySerializerId);
    if (serializer == null)
      throw new OConfigurationException("Runtime index definition cannot find binary serializer with id=" + keySerializerId
          + ". Assure to plug custom serializer into the server.");

    String collateField = document.field("collate");
    if (collateField == null)
      collateField = ODefaultCollate.NAME;
View Full Code Here

    case 'f':
      return OStoragePhysicalClusterConfigurationLocal.class;

    }

    throw new OConfigurationException("Unsupported record type: " + iType);
  }
View Full Code Here

         delay = OIOUtils.getTimeAsMillisecs(param.value);
       else if (param.name.equalsIgnoreCase("firsttime")) {
         try {
           firstTime = OIOUtils.getTodayWithTime(param.value);
         } catch (ParseException e) {
           throw new OConfigurationException("Parameter 'firstTime' has invalid format, expected: HH:mm:ss", e);
         }
       } else if (param.name.equalsIgnoreCase("target.directory"))
         targetDirectory = param.value;
       else if (param.name.equalsIgnoreCase("db.include") && param.value.trim().length() > 0)
         for (String db : param.value.split(","))
           includeDatabases.add(db);
       else if (param.name.equalsIgnoreCase("db.exclude") && param.value.trim().length() > 0)
         for (String db : param.value.split(","))
           excludeDatabases.add(db);
       else if (param.name.equalsIgnoreCase("target.fileName"))
         targetFileName = param.value;
       else if (param.name.equalsIgnoreCase("buffer"))
         bufferSize = Integer.parseInt(param.value);
       else if (param.name.equalsIgnoreCase("compressionLevel"))
         compressionLevel = Integer.parseInt(param.value);
     }

     if (delay <= 0)
       throw new OConfigurationException("Cannot find mandatory parameter 'delay'");
     if (!targetDirectory.endsWith("/"))
       targetDirectory += "/";

     final File filePath = new File(targetDirectory);
     if (filePath.exists()) {
       if (!filePath.isDirectory())
         throw new OConfigurationException("Parameter 'path' points to a file, not a directory");
     } else
       // CREATE BACKUP FOLDER(S) IF ANY
       filePath.mkdirs();

     OLogManager.instance().info(this, "Automatic backup plugin installed and active: delay=%dms, firstTime=%s, targetDirectory=%s",
View Full Code Here

    try {
      if (entityClass != null)
        return createInstance(entityClass);

    } catch (Exception e) {
      throw new OConfigurationException("Error while creating new pojo of class '" + iClassName + "'", e);
    }

    try {
      // TRY TO INSTANTIATE THE CLASS DIRECTLY BY ITS NAME
      return createInstance(Class.forName(iClassName));
    } catch (Exception e) {
      throw new OConfigurationException("The class '" + iClassName
          + "' was not found between the entity classes. Ensure registerEntityClasses(package) has been called first.", e);
    }
  }
View Full Code Here

       onServer = new ObjectName("OrientDB:type=Server");
       managedServer = new OrientServer();
       mBeanServer.registerMBean(managedServer, onServer);

     } catch (Exception e) {
       throw new OConfigurationException("Cannot initialize JMX server", e);
     }
   }
View Full Code Here

    try {
      final OFile f = newInstance(iType);
      f.init(iFileName, iOpenMode);
      return f;
    } catch (final Exception e) {
      throw new OConfigurationException("Cannot create file of type '" + iType + "'", e);
    }
  }
View Full Code Here

      valueContainerAlgorithm = NONE_VALUE_CONTAINER;

    if (SBTREE_ALGORITHM.equals(algorithm))
      return createSBTreeIndex(indexType, valueContainerAlgorithm, metadata);

    throw new OConfigurationException("Unsupported type : " + indexType);
  }
View Full Code Here

    } else if (OClass.INDEX_TYPE.DICTIONARY.toString().equals(indexType)) {
      return new OIndexDictionary(indexType, SBTREE_ALGORITHM,
          new OSBTreeIndexEngine<OIdentifiable>(durableInNonTxMode, trackMode), valueContainerAlgorithm, metadata);
    }

    throw new OConfigurationException("Unsupported type : " + indexType);
  }
View Full Code Here

            listener.onMessage("Found previous version: migrating old clusters...");
            database.dropCluster(name, true);
            database.addCluster("temp_" + clusterId, null);
            clusterId = database.addCluster(name);
          } else
            throw new OConfigurationException("Imported cluster '" + name + "' has id=" + clusterId
                + " different from the original: " + id + ". To continue the import drop the cluster '"
                + database.getClusterNameById(clusterId - 1) + "' that has " + database.countClusterElements(clusterId - 1)
                + " records");
        } else {
          database.dropCluster(clusterId, false);
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.