Package javax.jdo

Examples of javax.jdo.JDOFatalException


                verifyProperties(pmf, loadProperties(validPropertiesFile));
                context.bind(jndiName, pmf);
            }
            return JDOHelper.getPersistenceManagerFactory(jndiName, context);
        } catch (NamingException e) {
            throw new JDOFatalException("Caught NamingException trying to bind " +
                    e.getMessage(), e);
        } finally {
            if (context != null) {
                try {
                    context.unbind(jndiName);
View Full Code Here


                context.bind(jndiName, pmf);
            }
            return JDOHelper.getPersistenceManagerFactory(jndiName, context,
                    Thread.currentThread().getContextClassLoader());
        } catch (NamingException e) {
            throw new JDOFatalException("", e);
        } finally {
            if (context != null) {
                try {
                    context.unbind(jndiName);
                    context.close();
View Full Code Here

        Throwable t1Problem = group.getUncaughtException(T1);
        if (t1Problem != null) {
            if (t1Problem instanceof AssertionFailedError)
                throw (AssertionFailedError)t1Problem;
            else
                throw new JDOFatalException( "Thread "+T1.getName()+" results in exception ", t1Problem );
        }
        Throwable t2Problem = group.getUncaughtException(T2);
        if (t2Problem != null) {
            if (t2Problem instanceof AssertionFailedError)
                throw (AssertionFailedError)t2Problem;
            else
                throw new JDOFatalException( "Thread "+T2.getName()+" results in exception ", t2Problem );
        }

        if (debug) logger.debug ("END RefreshSideEffects");
    }
View Full Code Here

            DocumentBuilder builder = factory.newDocumentBuilder();
            builder.setEntityResolver(resolver);
            builder.setErrorHandler(handler);
            return builder;
        } catch (ParserConfigurationException ex) {
            throw new JDOFatalException("Cannot create XML parser", ex);
        }
    }
View Full Code Here

                    while (bufferedReader.ready()) {
                        tmp.add(bufferedReader.readLine());
                    }
                    lines = (String[])tmp.toArray(new String[tmp.size()]);
                } catch (IOException ex) {
                    throw new JDOFatalException("getLines: caught IOException", ex);
                }
            }
            return lines;
        }
View Full Code Here

                                getResourceAsStream(finalName);
                            }
                         }
                     );
                    if (stream == null) {
                        throw new JDOFatalException("Cannot load " + finalName +
                            ", because the file does not exist in the jdo.jar file, " +
                            "or the JDOParser class is not granted permission to read this file.  " +
                            "The metadata .xml file contained PUBLIC=" + publicId +
                            " SYSTEM=" + systemId + ".");
                    }
View Full Code Here

        SimpleDateFormat formatter = new SimpleDateFormat(pattern, locale);
        formatter.setTimeZone(TimeZone.getTimeZone(timezone));
        try {
            return formatter.parse(value);
        } catch (ParseException e) {
            throw new JDOFatalException("", e);
        }
    }
View Full Code Here

    public static Date toUtilDate(String pattern, Locale locale, String value) {
        SimpleDateFormat formatter = new SimpleDateFormat(pattern, locale);
        try {
            return formatter.parse(value);
        } catch (ParseException e) {
            throw new JDOFatalException("", e);
        }
    }
View Full Code Here

            setTearDownThrowable("cleanupPM", t);
        }
       
        if ((pmf == null || pmf.isClosed()) &&
            (this.tearDownInstances.size() > 0 || this.tearDownClasses.size() > 0))
            throw new JDOFatalException ("PMF must not be nullified or closed when tear down instances and /or classes have been added.");
       
        if (pmf != null && pmf.isClosed())
            pmf = null;
       
        try {
            if (cleanupData) {
                localTearDown();
            }
        }
        catch (Throwable t) {
            setTearDownThrowable("localTearDown", t);
        }
       
        if (closePMFAfterEachTest) {
            try {
                closePMF();
            }
            catch (Throwable t) {
                setTearDownThrowable("closePMF", t);
            }
        }
       
        if (this.tearDownThrowable != null) {
            Throwable t = this.tearDownThrowable;
            this.tearDownThrowable = null;
            if (testSucceeded) {
                // runTest succeeded, but this method threw exception => error
                throw new JDOFatalException("Exception during tearDown", t);
            }
        }
    }
View Full Code Here

            JDOException exc = (JDOException)nesteds[i];
            Object failedObject = exc.getFailedObject();
            if (exc.getFailedObject() instanceof PersistenceManager) {
                result[i] = (PersistenceManager)failedObject;
            } else {
                throw new JDOFatalException(assertionFailure,
                     "Unexpected failed object of type: " +
                     failedObject.getClass().getName());
            }
        }
        return result;
View Full Code Here

TOP

Related Classes of javax.jdo.JDOFatalException

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.