Package com.sleepycat.db

Examples of com.sleepycat.db.DatabaseException


        throws DatabaseException {

        String strId = new String(id);
        ObjectStreamClass desc = (ObjectStreamClass) idToDescMap.get(strId);
        if (desc == null) {
            throw new DatabaseException("classID not found");
        }
        return desc;
    }
View Full Code Here


        try {
            db = DbCompat.openDatabase
                (env, txn, fileAndDbNames[0], fileAndDbNames[1],
                 dbConfig);
        } catch (FileNotFoundException e) {
            throw new DatabaseException(e);
        }
        openCount = 1;
        boolean success = false;
        try {
            catalogData = readData(txn);
View Full Code Here

                    catalogData.formatList = (List) object;
                    catalogData.version = BETA_VERSION;
                }
                return catalogData;
            } catch (ClassNotFoundException e) {
                throw new DatabaseException(e);
            } catch (IOException e) {
                throw new DatabaseException(e);
            }
        } else {
            catalogData = new Data();
            catalogData.version = Catalog.CURRENT_VERSION;
        }
View Full Code Here

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(catalogData);
        } catch (IOException e) {
            throw new DatabaseException(e);
        }
        DatabaseEntry key = new DatabaseEntry(DATA_KEY);
        DatabaseEntry data = new DatabaseEntry(baos.toByteArray());
        db.put(txn, key, data);
View Full Code Here

            int len = key.getSize();
            byte[] arr = key.getData();
            boolean capped = true;

            if (len < 1)
                throw new DatabaseException("bad key");

            result.setSize(len - 1);
            for (int i=1; capped && i<len; i++) {
                if (!Character.isUpperCase((char)arr[i]))
                    capped = false;
View Full Code Here

            case 2:
                // Should result in an error.
                callback_throws = true;
                TestUtils.DEBUGOUT("throwing...");
                throw new DatabaseException("appendRecordNumber thrown");
                //not reached

            case 3:
                // Should result in an error (size unchanged).
                callback_throws = true;
View Full Code Here

TOP

Related Classes of com.sleepycat.db.DatabaseException

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.