Maven profile performing dropAll and update on Oracle failing with an error on populated database.

Description

Using the liquibase maven plugin, attempting a 'dropAll' followed by 'update' on a populated database is failing.

We have a maven profile set up like this:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 <profile> <id>liquibase-rebuild</id> <activation> <activeByDefault>false</activeByDefault> </activation> <build> <plugins> <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <executions> <execution> <phase>process-resources</phase> <configuration> <changeLogFile>src/main/liquibase/allUpdates.xml</changeLogFile> </configuration> <goals> <goal>dropAll</goal> <goal>update</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile>

When running a build using that profile, we see the following:

1 2 3 4 [INFO] Executing on Database: jdbc:oracle:thin:@devoraclevm.dev.vcgrp.net:11593:central INFO 05/11/14 10:42: liquibase: Successfully acquired change log lock INFO 05/11/14 10:42: liquibase: Dropping Database Objects in schema: CENTRAL_BUILD.CENTRAL_BUILD INFO 05/11/14 10:43: liquibase: Successfully released change log lock

Then the maven build fails, with this error:

1 [ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.0:dropAll (default) on project database: Error setting up or running Liquibase: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist -> [Help 1]

Re-running with the same maven profile then succeeds. Running with another profile that just does a dropAll is successful, so its running the dropAll with an immediately following update that is causing the issue.

We've been using this profile successfully for some time now on 2.x and 3.1.

At first look, it seems similar to CORE-2094, although that was with SpringLiquibase, so I thought another issue was a better way to go.

Environment

Oracle 12.
Linux.
Java 1.7.0_65.
Maven 3.0.4

Status

Assignee

Unassigned

Reporter

Simon Levitt

Labels

None

Components

Fix versions

Affects versions

3.3.0

Priority

Major