Package liquibase.exception

Examples of liquibase.exception.SetupException


      Enumeration<URL> urls = this.resourceAccessor.getResources(this.dataSet);
      AssertUtil.assertTrue("ResourceAccessor couldn't locate resource", urls.hasMoreElements());
      this.dataSetUrl = urls.nextElement();
      AssertUtil.assertFalse("ResourceAccessor found more than one resource", urls.hasMoreElements());
    } catch (Exception ex) {
      throw new SetupException("Couldn't find change set resource " + this.dataSet, ex);
    }
   
  }
View Full Code Here


                dbAuthType = "OTHER";
            }
        } catch (NameNotFoundException e) {
            dbAuthType = "OTHER";
        } catch (NamingException e) {
            throw new SetupException(e);
        } finally {
            if (initContext != null) {
                try {
                    initContext.close();
                } catch (NamingException e) {
View Full Code Here

        log.info("Raw documents will be migrated to: " + basePath);
        docsDirectory = new File(basePath, RAW_DOCUMENTS_SUBDIRECTORY);
        try {
            docsDirectory.mkdirs();
        } catch (SecurityException e) {
            throw new SetupException(e);
        }
    }
View Full Code Here

        try {
            initContext = new InitialContext();
            basePath = (String) initContext.lookup(BASE_PATH_JNDI_NAME);

            if (basePath == null) {
                throw new SetupException(messageJndiNameNotBound);
            }
        } catch (NameNotFoundException e) {
            throw new SetupException(messageJndiNameNotBound, e);
        } catch (NamingException e) {
            throw new SetupException(messageJndiNameNotBound, e);
        } finally {
            if (initContext != null) {
                try {
                    initContext.close();
                } catch (NamingException e) {
View Full Code Here

    }

    private String tryGetFallbackBasePath(SetupException initialFailureCause)
            throws SetupException {
        if (!basePathParamIsSet()) {
            throw new SetupException(
                    "No information for document storage directory. "
                            + "Fallback liquibase parameter \""
                            + BASE_PATH_LIQUIBASE_PARAM + "\" not set. "
                            + "Cannot migrate documents to file system.",
                    initialFailureCause);
View Full Code Here

    }

    @Override
    public void finishInitialization() throws SetupException {
        if (path == null) {
            throw new SetupException("<sqlfile> - No path specified");
        }
    }
View Full Code Here

    @Test
    public void visit_setupException() throws Exception {
        changeSet1.addChange(new CreateTableChange() {
            @Override
            public void finishInitialization() throws SetupException {
                throw new SetupException("Test message");
            }
        });

        ValidatingVisitor handler = new ValidatingVisitor(new ArrayList<RanChangeSet>());
        handler.visit(changeSet1, new DatabaseChangeLog(), null, null);
View Full Code Here

TOP

Related Classes of liquibase.exception.SetupException

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.