Package org.fcrepo.server.errors

Examples of org.fcrepo.server.errors.GeneralException


                } catch (Throwable th) {
                    String msg =
                            "Error updating " + whichIndex + " index for " +
                                    pid;
                    logger.error(msg, th);
                    throw new GeneralException(msg, th);
                }
            } catch (Throwable th) {
                if (obj.isNew()) {
                    // Clean up after a failed attempt to add
                    try {
                        removeObject(obj, true);
                    } catch (Exception e) {
                        logger.warn(
                                "Error while cleaning up after failed add for " +
                                        pid, e);
                    }
                }
                if (th instanceof ServerException) {
                    throw (ServerException) th;
                } else {
                    throw new GeneralException(
                            "Unable to add or modify object " + pid +
                                    " (commit canceled)", th);
                }
            }
        }
View Full Code Here


            cje.addArgument(ARGUMENT_NAME_DS_ID, dsID);
            cje.addArgument(ARGUMENT_NAME_VERSIONABLE, versionable);
            cje.addArgument(ARGUMENT_NAME_LOG_MESSAGE, logMessage);
            return (Date) cje.invokeAndClose(delegate, writer);
        } catch (JournalException e) {
            throw new GeneralException("Problem creating the Journal", e);
        }
    }
View Full Code Here

            for (int i = 0; i < numPIDs; i++) {
                pidList[i] = m_pidGenerator.generatePID(namespace).toString();
            }
            return pidList;
        } catch (IOException ioe) {
            throw new GeneralException(
                    "DefaultDOManager.getNextPID: Error " +
                            "generating PID, PIDGenerator returned unexpected error: (" +
                            ioe.getClass().getName() + ") - " +
                            ioe.getMessage());
        }
View Full Code Here

            cje.addArgument(ARGUMENT_NAME_START_DATE, startDT);
            cje.addArgument(ARGUMENT_NAME_END_DATE, endDT);
            cje.addArgument(ARGUMENT_NAME_LOG_MESSAGE, logMessage);
            return (Date[]) cje.invokeAndClose(delegate, writer);
        } catch (JournalException e) {
            throw new GeneralException("Problem creating the Journal", e);
        }
    }
View Full Code Here

            CreatorJournalEntry cje =
                    new CreatorJournalEntry(METHOD_PUT_TEMP_STREAM, context);
            cje.addArgument(ARGUMENT_NAME_IN, in);
            return (String) cje.invokeAndClose(delegate, writer);
        } catch (JournalException e) {
            throw new GeneralException("Problem creating the Journal", e);
        }
    }
View Full Code Here

        try {
            for (String element : pidList) {
                m_pidGenerator.neverGeneratePID(element);
            }
        } catch (IOException e) {
            throw new GeneralException("Error reserving PIDs", e);
        }
    }
View Full Code Here

                    new CreatorJournalEntry(METHOD_GET_NEXT_PID, context);
            cje.addArgument(ARGUMENT_NAME_NUM_PIDS, numPIDs);
            cje.addArgument(ARGUMENT_NAME_NAMESPACE, namespace);
            return (String[]) cje.invokeAndClose(delegate, writer);
        } catch (JournalException e) {
            throw new GeneralException("Problem creating the Journal", e);
        }
    }
View Full Code Here

            hash.append(getLatestModificationDate(conn));

            return hash.toString();

        } catch (SQLException e) {
            throw new GeneralException("SQL error encountered while computing "
                    + "repository hash", e);
        } finally {
            if (conn != null) {
                m_connectionPool.free(conn);
            }
View Full Code Here

            cje.addArgument(ARGUMENT_NAME_OBJECT, objURI);
            cje.addArgument(ARGUMENT_NAME_IS_LITERAL, isLiteral);
            cje.addArgument(ARGUMENT_NAME_DATATYPE, datatype);
            return (Boolean) cje.invokeAndClose(delegate, writer);
        } catch (JournalException e) {
            throw new GeneralException("Problem creating the Journal", e);
        }
    }
View Full Code Here

            cje.addArgument(ARGUMENT_NAME_OBJECT, object);
            cje.addArgument(ARGUMENT_NAME_IS_LITERAL, isLiteral);
            cje.addArgument(ARGUMENT_NAME_DATATYPE, datatype);
            return (Boolean) cje.invokeAndClose(delegate, writer);
        } catch (JournalException e) {
            throw new GeneralException("Problem creating the Journal", e);
        }
    }
View Full Code Here

TOP

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

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.