unable to update on DB2/400, version V6R1, on jt400-6.7.jar

Description

When i first run update on the empty schema, all my tables are created (including liquibase tables like databasechangelog), but when i try to update the schema, liquibase is looking for DATABASECHANGELOG table (but without schema), then fails as it does not find it.

So for now, only first update on empty schema is running with success, typically, i have this kind of trace :

salad74@themint:~/Projects/giraf/src/main/db/liquibase > liquibase update
Liquibase Update Successful
salad74@themint:~/Projects/giraf/src/main/db/liquibase > liquibase update
Liquibase update Failed: liquibase.exception.DatabaseException: java.sql.SQLException: [SQL0204] DATABASECHANGELOG de type *FILE dans S06A603R non trouvé.

For more information, use the --logLevel flag

in liquibase.properties, i provide defaultSchemaName :

driver=com.ibm.as400.access.AS400JDBCDriver
url=jdbc:as400://ROBINNW
username=adminwas
password=XXXX
changeLogFile=db.changelog.xml
defaultSchemaName=adminwas
logLevel=debug
logFile=giraf.log

here is the full stack in debug :

DEBUG 1/22/14 2:35 PM:liquibase: Connected to ADMINWAS@jdbc:as400://ROBINNW;libraries=ADMINWAS
DEBUG 1/22/14 2:35 PM:liquibase: Setting auto commit to false from true
DEBUG 1/22/14 2:35 PM:liquibase: Executing QUERY database command: select count from ADMINWAS.DATABASECHANGELOGLOCK
DEBUG 1/22/14 2:35 PM:liquibase: Executing QUERY database command: SELECT LOCKED FROM ADMINWAS.DATABASECHANGELOGLOCK WHERE ID=1
DEBUG 1/22/14 2:35 PM:liquibase: Lock Database
DEBUG 1/22/14 2:35 PM:liquibase: Executing UPDATE database command: UPDATE ADMINWAS.DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = 'themint (10.0.0.1)', LOCKGRANTED = TIMESTAMP('2014-01-22 14:35:48.347') WHERE ID = 1 AND LOCKED = 0
INFO 1/22/14 2:35 PM:liquibase: Successfully acquired change log lock
DEBUG 1/22/14 2:35 PM:liquibase: Checking DATABASECHANGELOG.S06A603R for auto-increment with SQL: 'select ID from S06A603R.DATABASECHANGELOG where 0=1'
DEBUG 1/22/14 2:35 PM:liquibase: Release Database Lock
DEBUG 1/22/14 2:35 PM:liquibase: Executing UPDATE database command: UPDATE ADMINWAS.DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1
INFO 1/22/14 2:35 PM:liquibase: Successfully released change log lock
SEVERE 1/22/14 2:35 PM:liquibase: liquibase.exception.DatabaseException: java.sql.SQLException: [SQL0204] DATABASECHANGELOG de type *FILE dans S06A603R non trouvé.
liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: java.sql.SQLException: [SQL0204] DATABASECHANGELOG de type *FILE dans S06A603R non trouvé.
at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:81)
at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:725)
at liquibase.Liquibase.update(Liquibase.java:196)
at liquibase.Liquibase.update(Liquibase.java:181)
at liquibase.integration.commandline.Main.doMigration(Main.java:880)
at liquibase.integration.commandline.Main.main(Main.java:133)
Caused by: liquibase.exception.DatabaseException: java.sql.SQLException: [SQL0204] DATABASECHANGELOG de type *FILE dans S06A603R non trouvé.
at liquibase.snapshot.jvm.ColumnSnapshotGenerator.snapshotObject(ColumnSnapshotGenerator.java:55)
at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:59)
at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:47)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:131)
at liquibase.snapshot.DatabaseSnapshot.replaceObject(DatabaseSnapshot.java:199)
at liquibase.snapshot.DatabaseSnapshot.includeNestedObjects(DatabaseSnapshot.java:158)
at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:145)
at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:36)
at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:24)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:129)
at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:137)
at liquibase.snapshot.SnapshotGeneratorFactory.getDatabaseChangeLogTable(SnapshotGeneratorFactory.java:144)
at liquibase.changelog.StandardChangeLogHistoryService.init(StandardChangeLogHistoryService.java:79)
... 5 more
Caused by: java.sql.SQLException: [SQL0204] DATABASECHANGELOG de type *FILE dans S06A603R non trouvé.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:646)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:617)
at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java:1581)
at com.ibm.as400.access.AS400JDBCStatement.executeQuery(AS400JDBCStatement.java:2141)
at liquibase.snapshot.jvm.ColumnSnapshotGenerator.readColumn(ColumnSnapshotGenerator.java:150)
at liquibase.snapshot.jvm.ColumnSnapshotGenerator.snapshotObject(ColumnSnapshotGenerator.java:50)
... 17 more

The only missing thing is the schema name in the front of the DATABASECHANGELOG while trying to retrieve changelogs

I have tried to play with jdbc url to force default schema, but no way, schemaname lacks on front of DATABASECHANGELOG table name.

Environment

salad74@themint:~/Projects/giraf/src/main/db/liquibase > uname -a
Linux themint 3.8.0-25-generic #37-Ubuntu SMP Thu Jun 6 20:47:07 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/issue
Linux Mint 15 Olivia \n \l

Reporter

Adrien SALES

Components

Fix versions

Affects versions

Priority

Major
Configure