Examples of DatabaseException


Examples of com.art.anette.exceptions.DatabaseException

    public void checkVersion() throws DatabaseException {
        try {
            ResultSet rs = query("SELECT Version FROM DBSchema where id=1");
            if (rs.next()) {
                if (!EXPECTED_DBSCHEMA_VERSION.equals(rs.getString("Version"))) {
                    throw new DatabaseException("Wrong version of DBSchema");
                }
            }
        } catch (SQLException e) {
            throw new DatabaseException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of com.art.anette.exceptions.DatabaseException

            try {
                Class.forName(getDBClass()).newInstance();
                connection = DriverManager.getConnection(getDBUrl(), user, password);
            } catch (SQLException ex) {
                logger.severe(null, ex);
                throw new DatabaseException("Connecting to database failed!", ex);
            } catch (InstantiationException ex) {
                logger.severe(null, ex);
                throw new DatabaseException("Instantiation of the database driver failed!", ex);
            } catch (IllegalAccessException ex) {
                logger.severe(null, ex);
                throw new DatabaseException("Accessing the database driver failed!", ex);
            } catch (ClassNotFoundException ex) {
                logger.severe(null, ex);
                throw new DatabaseException("Database driver not found!", ex);
            }
        }
    }
View Full Code Here

Examples of com.darwinsys.database.DataBaseException

      if (st != null)
        st.close();
      if (conn != null)
        conn.close();
    } catch (SQLException e) {
      throw new DataBaseException("Cleanup caught exception: " + e);
    }
  }
View Full Code Here

Examples of com.findwise.hydra.DatabaseException

   */
  public void addLibrary(String id, String filename, InputStream stream) throws DatabaseException {
    try {
      getConnector().getPipelineWriter().save(id, filename, stream);
    } catch (IOException e) {
      throw new DatabaseException("Failed to connect to database", e);
    }
  }
View Full Code Here

Examples of com.imaginea.mongodb.exceptions.DatabaseException

                Mongo mongoInstance = authService.getMongoInstance(connectionId);
                // Get Server Stats
                try {
                    return mongoInstance.getDB("admin").command("serverStatus");
                } catch (MongoException e) {
                    throw new DatabaseException(ErrorCodes.GET_DB_STATS_EXCEPTION, e.getMessage());
                }
            }
        });
        return response;
    }
View Full Code Here

Examples of com.samskivert.depot.DatabaseException

            if (updateStat(playerId, tstat, false)) {
                return tstat;
            }
        }

        throw new DatabaseException(
            "Unable to update stat after " + MAX_UPDATE_TRIES + " attempts " +
            "[stat=" + modifier.getType() + ", pid=" + playerId + "]");
    }
View Full Code Here

Examples of com.sleepycat.db.DatabaseException

                        (db.getEnvironment(), null/*txn*/,
                         DbCompat.getDatabaseFile(secDb),
                         secDb.getDatabaseName(),
                         config);
                } catch (FileNotFoundException e) {
                    throw new DatabaseException(e);
                }
            }
            keysIndex = new KeysIndex<SK,PK>
                (keysDb, keyClass, keyBinding,
                 priIndex.getKeyClass(), priIndex.getKeyBinding());
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

    private Node fetchLSNHandleExceptions(long lsn,
                                          DatabaseEntry lnKeyEntry,
                                          LSNAccumulator pendingLSNs) {

        DatabaseException dbe = null;

        try {
            return fetchLSN(lsn, lnKeyEntry, pendingLSNs);
        } catch (FileNotFoundException e) {
            if (excPredicate == null ||
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

    protected void callProcessLSNHandleExceptions(long childLSN,
                                                  LogEntryType childType,
                                                  Node theNode,
                                                  byte[] lnKey) {
        DatabaseException dbe = null;

        try {
            callback.processLSN(childLSN, childType, theNode, lnKey);
        } catch (FileNotFoundException e) {
            if (excPredicate == null ||
View Full Code Here

Examples of com.sleepycat.je.DatabaseException

        /*
         * A post commit exception that needs to be propagated back to the
         * caller. Its throw is delayed until the post commit cleanup has been
         * completed.
         */
        DatabaseException queuedPostCommitException = null;

        this.commitDurability = durability;

        try {

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.