Package org.fcrepo.server.errors

Examples of org.fcrepo.server.errors.StorageDeviceException


            try {
                unregisterObject(obj);
            } catch (Throwable th) {
            }
            // ...then notify the caller with the original exception
            throw new StorageDeviceException(
                    "Unexpected error from SQL database while registering object: " +
                            sqle.getMessage(), sqle);
        } finally {
            try {
                if (st != null) {
                    st.close();
                }
                if (conn != null) {
                    m_connectionPool.free(conn);
                }
            } catch (Exception sqle) {
                throw new StorageDeviceException(
                        "Unexpected error from SQL database while registering object: " +
                                sqle.getMessage(), sqle);
            } finally {
                st = null;
            }
View Full Code Here


            //TODO hasModel
            if (obj.hasContentModel(Models.SERVICE_DEPLOYMENT_3_0)) {
                updateDeploymentMap(obj, conn, true);
            }
        } catch (SQLException sqle) {
            throw new StorageDeviceException(
                    "Unexpected error from SQL database while unregistering object: " +
                            sqle.getMessage(), sqle);
        } finally {
            try {
                if (st != null) {
                    st.close();
                }
                if (conn != null) {
                    m_connectionPool.free(conn);
                }
            } catch (Exception sqle) {
                throw new StorageDeviceException(
                        "Unexpected error from SQL database while unregistering object: " +
                                sqle.getMessage(), sqle);
            } finally {
                st = null;
            }
View Full Code Here

            while (pidIter.hasNext()) {
                ret[i++] = pidIter.next();
            }
            return ret;
        } catch (SQLException sqle) {
            throw new StorageDeviceException(
                    "Unexpected error from SQL database: " + sqle.getMessage(),
                    sqle);

        } finally {
            try {
                if (results != null) {
                    results.close();
                }
                if (s != null) {
                    s.close();
                }
                if (conn != null) {
                    m_connectionPool.free(conn);
                }
            } catch (SQLException sqle) {
                throw new StorageDeviceException(
                        "Unexpected error from SQL database: " +
                                sqle.getMessage(), sqle);
            } finally {
                results = null;
                s = null;
View Full Code Here

            int len;
            while ((len = in.read(buf)) != -1) {
                out.write(buf, 0, len);
            }
        } catch (IOException ioe) {
            throw new StorageDeviceException("Error writing to stream");
        } finally {
            try {
                out.close();
                in.close();
            } catch (IOException closeProb) {
View Full Code Here

TOP

Related Classes of org.fcrepo.server.errors.StorageDeviceException

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.