Examples of SystemFailureException


Examples of org.modeshape.common.SystemFailureException

        } catch (InterruptedException e) {
            Thread.interrupted();
        }

        if (!deltaReconciliationCompleted()) {
            throw new SystemFailureException(JcrI18n.journalHasNotCompletedReconciliation.text(journalId(), clusterName(),
                                                                                               MAX_MINUTES_TO_WAIT_FOR_RECONCILIATION));
        }
    }
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

        protected String name() {
            try {
                Path path = node().path();
                return path.isRoot() ? "" : stringFor(path.getLastSegment());
            } catch (Exception e) {
                throw new SystemFailureException(e);
            }
        }
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

                return node().getPath();
            } catch (Throwable e) {
                try {
                    return node().toString();
                } catch (SAXException e2) {
                    throw new SystemFailureException(e2);
                }
            }
        }
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

            }

            return defn;
        } catch (ConstraintViolationException e) {
            // this is never expected
            throw new SystemFailureException(e);
        }
    }
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

                    }
                }
            }
            this.initialized = true;
        } catch (RepositoryException e) {
            throw new SystemFailureException(e);
        } finally {
            if (session != null) {
                session.logout();
            }
        }
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

    }

    private static void initializeI18nField( Field fld ) throws IllegalAccessException {
        // Ensure field is public
        if ((fld.getModifiers() & Modifier.PUBLIC) != Modifier.PUBLIC) {
            throw new SystemFailureException(CommonI18n.i18nFieldNotPublic.text(fld.getName(), fld.getDeclaringClass()));
        }

        // Ensure field is static
        if ((fld.getModifiers() & Modifier.STATIC) != Modifier.STATIC) {
            throw new SystemFailureException(CommonI18n.i18nFieldNotStatic.text(fld.getName(), fld.getDeclaringClass()));
        }

        // Ensure field is not final
        if ((fld.getModifiers() & Modifier.FINAL) == Modifier.FINAL) {
            throw new SystemFailureException(CommonI18n.i18nFieldFinal.text(fld.getName(), fld.getDeclaringClass()));
        }

        // Ensure we can access field even if it's in a private class
        ClassUtil.makeAccessible(fld);
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

            }
            // Get the URL to the localization properties file ...
            final String localizationBaseName = i18nClass.getName();
            URL bundleUrl = ClasspathLocalizationRepository.getLocalizationBundle(i18nClass.getClassLoader(), localizationBaseName, locale);
            if (bundleUrl == null && i18nClass == CommonI18n.class) {
                throw new SystemFailureException("CommonI18n.properties file not found in classpath !");
            }
            if (bundleUrl == null) {
                LOGGER.warn(CommonI18n.i18nBundleNotFoundInClasspath,
                            ClasspathLocalizationRepository.getPathsToSearchForBundle(localizationBaseName, locale));
                // Nothing was found, so try the default locale
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

        if (text != null) {
            return text;
        }
        // If not, there was a problem, so throw it within an exception so upstream callers can tell the difference between normal
        // text and problem text.
        throw new SystemFailureException(problem(locale));
    }
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

                                    Collection<String> unexportableNamespaces ) {
        try {
            this.writer = new OutputStreamWriter(os, DEFAULT_ENCODING);
        } catch (UnsupportedEncodingException e) {
            // This should never happen ...
            throw new SystemFailureException(e);
        }
        this.unexportableNamespaces = unexportableNamespaces;
        this.mappedPrefixes = new HashMap<String, String>();
        this.declaration = "version=\"1.0\" encoding=\"" + DEFAULT_ENCODING + "\"";
    }
View Full Code Here

Examples of org.modeshape.common.SystemFailureException

            javax.naming.InitialContext context = new javax.naming.InitialContext();
            if (name1 != null) context.rebind(name1, obj1);
            if (name2 != null) context.rebind(name2, obj2);
            if (name3 != null) context.rebind(name3, obj3);
        } catch (NamingException e) {
            throw new SystemFailureException("Unable to create the mock InitialContext", e);
        }
    }
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.