Package javax.jdo

Examples of javax.jdo.JDOFatalException


            resultStream = new PrintStream(new FileOutputStream(file));
            for (Iterator it = supportedOptions.iterator(); it.hasNext();) {
                resultStream.println((String)it.next());
            }
        } catch (FileNotFoundException e) {
            throw new JDOFatalException(
                "dumpSupportedOptions: cannot create file " + file.getName(), e);
        } finally {
            if (resultStream != null)
                resultStream.close();
        }
View Full Code Here


    /** */
    public TestResult start(String[] args) {
        Test suite = null;
        if ((args == null) || args.length == 0) {
            String conf = System.getProperty("jdo.tck.cfg");
            throw new JDOFatalException(
                "Missing JDO TCK test classes for configuration '" + conf +
                "'. Please check the property 'jdo.tck.classes'.");
        }
        else if (args.length == 1) {
            suite = getTest(args[0]);
View Full Code Here

        try {
            resultStream = new PrintStream(
                    new FileOutputStream(path, true));
            resultStream.println(message);
        } catch (FileNotFoundException e) {
            throw new JDOFatalException("Cannot create file " + path, e);
        } finally {
            if (resultStream != null)
                resultStream.close();
        }
    }
View Full Code Here

        try {
            resultStream = new PrintStream(
                    new FileOutputStream(fileName, true));
            resultStream.println(message);
        } catch (FileNotFoundException e) {
            throw new JDOFatalException("Cannot create file "+fileName, e);
        } finally {
            if (resultStream != null)
                resultStream.close();
        }
    }
View Full Code Here

                }
            }
        } catch (FileNotFoundException e) {
            result = null;
        } catch (IOException e) {
            throw new JDOFatalException(
                    "Cannot deserialize result summary in file "
                    +fileName, e);
        } catch (ClassNotFoundException e) {
            throw new JDOFatalException(
                    "Cannot deserialize result summary in file "
                    +fileName, e);
        }
        return result;
    }
View Full Code Here

                if (oos != null) {
                    oos.close();
                }
            }
        } catch (FileNotFoundException e) {
            throw new JDOFatalException(
                    "Cannot create file " + fileName, e);
        } catch (IOException e) {
            throw new JDOFatalException(
                    "Cannot serialize result summary to file "
                    + fileName, e);
        }
    }
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

                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

            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.