Liquibase 3.3.2失败,异常ORA-00955:name已被现有对象使用

时间:2015-04-15 02:19:06

标签: spring oracle spring-boot liquibase

我使用Liquibase作为Spring启动程序的一部分。

之前我们有普通的Java Web应用程序,我们曾经使用liquibase-3.0.2版本手动运行Liquibase。

现在,作为Liquibase + Spring启动的一部分,我们尝试在同一个oracle数据库上运行Liquibase。所以只有应用程序被更改而不是数据库。

在我的pom.xml

我正在使用

<dependency>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-core</artifactId>
        <version>3.3.2</version>
    </dependency>

or

    <dependency>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-core</artifactId>
    </dependency>

因此,每当我尝试部署应用程序时都会使用最新的Liquibase版本

CONSOLE: 15:18:53.190 [localhost-startStop-1] INFO  liquibase - Reading from SCHEMAMETA.DATABASECHANGELOG
CONSOLE: 15:18:53.600 [localhost-startStop-1] ERROR liquibase - classpath:/db/changelog/db.changelog-master.xml: classpath:/db/changelog/db.changelog-1.0.xml::001_create_ABC_TABLE::tcolson: Change Set classpath:/db/changelog/db.changelog-1.0.xml::001_create_ABC_TABLE::tcolson failed.  Error: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object

我使用两个版本的mavan获得相同的例外。 它应该说好,所有已经部署,这里无关。但看起来Liquibase即使在验证现有条目时也失败了。

请告诉我这里的问题或任何解决方案。

1 个答案:

答案 0 :(得分:1)

此问题与liquibase.exception.DatabaseException: java.sql.SQLSyntaxErrorException: ORA-02264: name already used by an existing constraint相同 这与Liquibase 3.3.2版本无关。

首先,您应该在命令之后运行,之后您将能够成功执行liquibase更新。

命令:./liquibase changeLogSync