值'CONTINUE'在运行liquibase时不是方面有效的错误 [英] Value 'CONTINUE' is not facet-valid error on running liquibase

查看:392
本文介绍了值'CONTINUE'在运行liquibase时不是方面有效的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行以下命令时:

When i try to run the following command:

java -jar liquibase-3.4.1.jar --classpath=postgresql-9.2-1004.jdbc4.jar --logLevel=severe --url=jdbc:postgresql://localhost/raritan --username=<USER>--password=<PWD> --changeLogFile=master_changelog.xml update

我收到以下异常:

    SEVERE 8/29/16 12:46 PM: liquibase: Error parsing line 7 column 35 of changelogdropViews.xml: cvc-enumeration-valid: Value 'CONTINUE' is not facet-valid withespect to enumeration '[HALT, WARN]'. It must be a value from the enumeration. liquibase.exception.ChangeLogParseException: iquibase.exception.SetupException
 Error parsing line 7 column 35 of changelog_dropViews.xml: cvc-enumeration-val
d: Value 'CONTINUE' is not facet-valid with respect to enumeration '[HALT, WARN
'. It must be a value from the enumeration.

这是我的变更日志文件:

This is my changelog file:

    <?xml version="1.0" ?>
<databaseChangeLog
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

    <preConditions onFail="CONTINUE">
            <sqlCheck expectedResult="1">select count(1) from pg_extension where extname='plsh'</sqlCheck>
    </preConditions>

推荐答案

有关前提条件,请参阅文档: http://www.liquibase.org/documentation/preconditions.html

See the documentation for preconditions: http://www.liquibase.org/documentation/preconditions.html

上面写着:

在变更集之外(例如,在变更日志的开头),只有HALT和WARN是可能的值.

Outside a changeset (e.g. at the beginning of the change log), only HALT and WARN are possible values.

这篇关于值'CONTINUE'在运行liquibase时不是方面有效的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆