Examples of DatabaseException


Examples of com.sleepycat.je.DatabaseException

        boolean success = false;
        try {
            boolean primaryExists =
                truncateIfExists(txn, storePrefix + clsName);
            if (primaryExists) {
                DatabaseException firstException = null;
                for (SecondaryKeyMetadata keyMeta :
                     entityMeta.getSecondaryKeys().values()) {
                    /* Ignore secondaries that do not exist. */
                    removeIfExists
                        (txn,
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

        EntityMetadata entityMeta = checkEntityClass(clsName);

        PrimaryIndex priIndex = priIndexMap.get(clsName);
        if (priIndex != null) {
            /* Close the secondaries first. */
            DatabaseException firstException = null;
            for (SecondaryKeyMetadata keyMeta :
                 entityMeta.getSecondaryKeys().values()) {

                String secName = makeSecName(clsName, keyMeta.getKeyName());
                SecondaryIndex secIndex = secIndexMap.get(secName);
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

        if (catalog == null) {
            return;
        }

        DatabaseException firstException = null;
        try {
            if (rawAccess) {
                boolean allClosed = catalog.close();
                assert allClosed;
            } else {
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

        startup(initialElectionPolicy);
        LoggerUtils.finest(logger, repImpl, "joinGroup " +
                           nodeState.getRepEnvState());

        DatabaseException exitException = null;
        int retries=0;
        repImpl.getStartupTracker().start(Phase.BECOME_CONSISTENT);
        repImpl.getStartupTracker().setProgress
           (RecoveryProgress.BECOME_CONSISTENT);
        try {
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

      if(arc.length() == 0) {
        throw new ParseException("no/invalid arc",0);
      }
      String urls[] = locationDB.arcToUrls(arc);
      if(urls == null || urls.length == 0) {
        throw new DatabaseException("Unable to locate("+arc+")");
      }
      String urlString = urls[0];
      String rangeHeader = httpRequest.getHeader(RANGE_HTTP_HEADER);
      URL url = new URL(urlString);
      URLConnection conn = url.openConnection();
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

//environmentConfig.setReadOnly(true); TODO MC
    environmentConfig.setConfigParam("je.log.fileMax",JE_LOG_FILEMAX);
    File file = new File(path);
    if(!file.isDirectory()) {
      if(!file.mkdirs()) {
        throw new DatabaseException("failed mkdirs(" + path + ")");
      }
    }
    env = new Environment(file, environmentConfig);
    DatabaseConfig databaseConfig = new DatabaseConfig();
    databaseConfig.setAllowCreate(true);
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

            final OperationStatus status = this.ticketDb.put(null,
                getKeyFromString(ticket.getId()), dataEntry);

            if (status != OperationStatus.SUCCESS) {
                throw new DatabaseException("Data insertion got status "
                    + status);
            }
        } catch (final DatabaseException e) {
            throw new RuntimeException(
                "Ticket Registry DB failed to add ticket : " + ticket, e);
View Full Code Here

Examples of com.thimbleware.jmemcached.protocol.exceptions.DatabaseException

import junit.framework.TestCase;

public class DatabaseExceptionTest extends TestCase {
  public void testPerformance() {
    DatabaseException exception = new DatabaseException("password wrong");
    exception.printStackTrace();
    long start = System.currentTimeMillis();
    for (int i = 0; i < 10000000; i++) {
      exception = new DatabaseException("password wrong");

    }
    System.out.println("spend:" + (System.currentTimeMillis() - start)
        + "ms");
  }
View Full Code Here

Examples of com.uwyn.rife.database.exceptions.DatabaseException

    {
      IndexQueueFactory.getInstance(getDatasource()).remove();
    }
    catch (IndexQueryManagerRemovalException e)
    {
      throw new RemoveErrorException(new DatabaseException(e));
    }

    return true;
  }
View Full Code Here

Examples of com.youtube.vitess.vtgate.Exceptions.DatabaseException

    String error = response.getError();
    if (error != null) {
      if (error.contains(INTEGRITY_ERROR_MSG)) {
        throw new IntegrityException(error);
      }
      throw new DatabaseException(response.getError());
    }
    if (response.getSession() != null) {
      session = response.getSession();
    }
    if (query.isStreaming()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.