Liquibase: 在升级到 4.20 版本后,针对 hsqldb 没有生成任何输出。

huangapple go评论58阅读模式
英文:

Liquibase: generateChangeLog - no output is created after upgrading to 4.20 for hsqldb

问题

After upgrading from Liquibase 4.19.1 to any newer version, it seems that the changelog file is no longer generated with your Gradle task. You've tested this issue with Liquibase versions 4.19.1, 4.20.0, and 4.21.1, and it occurs in all of them.

The HSQLDB version you are using is 2.7.1.

Despite successful execution, no error report or similar information is generated in the logs. The logging output at the "FINE" level shows various steps taken by Liquibase but does not indicate any issues.

It appears that you are seeking ideas or suggestions to resolve this issue.

英文:

After upgrading from liquibase 4.19.1 to any newer version, no changelog file is generated with my gradle task anymore. For test purposes I only created a simple database with one table and two columns...

Tested with liquibase 4.19.1, 4.20.0, 4.21.1

HSQLDB version 2.7.1
The logs are not helpful, because the task was successfully executed...

task createPlainChangeLog(type: JavaExec) {
    main = 'liquibase.integration.commandline.Main'
    args = [
            '--url', "jdbc:hsqldb:file:./db/db",
            '--driver', "org.hsqldb.jdbcDriver",
            '--username', "xx",
            '--password', "xx",
            '--changeLogFile', "changelog.xml",
            'generateChangeLog'
    ]
    classpath = configurations.changelog
}

Following output is generated with liquibase 4.19.1

<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
    <changeSet author="User (generated)" id="1683714327687-1">
        <createTable tableName="USERLIST">
            <column name="USERNAME" type="VARCHAR(255)">
                <constraints nullable="false" primaryKey="true" primaryKeyName="SYS_PK_10093"/>
            </column>
            <column name="CREDENTIALS" type="VARCHAR(255)"/>
        </createTable>
    </changeSet>
</databaseChangeLog>

No error report or similar is created. Logging output with loglevel all:

[2023-05-10 12:27:56] FINE [liquibase.configuration] No configuration value for liquibase.showBanner found
[2023-05-10 12:27:56] FINE [liquibase.configuration] Configuration liquibase.showBanner is using the default value of true
[2023-05-10 12:27:56] INFO [liquibase.ui] ####################################################
##   _     _             _ _                      ##
##  | |   (_)           (_) |                     ##
##  | |    _  __ _ _   _ _| |__   __ _ ___  ___   ##
##  | |   | |/ _` | | | | | '_ \ / _` / __|/ _ \  ##
##  | |___| | (_| | |_| | | |_) | (_| \__ \  __/  ##
##  \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___|  ##
##              | |                               ##
##              |_|                               ##
##                                                ## 
##  Get documentation at docs.liquibase.com       ##
##  Get certified courses at learn.liquibase.com  ## 
##  Free schema change activity reports at        ##
##      https://hub.liquibase.com                 ##
##                                                ##
####################################################
Starte Liquibase am 12:27:56 (Version 4.21.1 #9070, kompiliert am 2023-04-13 20:56+0000)
[2023-05-10 12:27:56] FINE [liquibase.configuration] No configuration value for liquibase.shouldRun aka should.run found
[2023-05-10 12:27:56] FINE [liquibase.configuration] Configuration liquibase.shouldRun is using the default value of true
[2023-05-10 12:27:56] FINE [liquibase.resource] Creating resourceAccessor for directory C:\tmp\changelog
[2023-05-10 12:27:56] FINE [liquibase.configuration] No configuration value for liquibase.hub.url found
[2023-05-10 12:27:56] FINE [liquibase.configuration] Configuration liquibase.hub.url is using the default value of https://hub.liquibase.com
[2023-05-10 12:27:56] FINE [liquibase.integration] Liquibase Hub URL:      https://hub.liquibase.com
[2023-05-10 12:27:56] FINE [liquibase.configuration] No configuration value for liquibase.hub.mode found
[2023-05-10 12:27:56] FINE [liquibase.configuration] Configuration liquibase.hub.mode is using the default value of ALL
[2023-05-10 12:27:56] FINE [liquibase.integration] Liquibase Hub Mode:     ALL
[2023-05-10 12:27:56] FINE [liquibase.resource] Creating resourceAccessor for directory C:\tmp\changelog
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.CalculateChecksumCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ChangelogSyncCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ChangelogSyncSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ChangelogSyncToTagCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ChangelogSyncToTagSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ClearChecksumsCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DbDocCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DeactivateChangelogCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DiffChangelogCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DiffCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.DropAllCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ExecuteSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.FutureRollbackCountSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.FutureRollbackFromTagSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.FutureRollbackSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.GenerateChangelogCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.HistoryCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalDropAllCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalExecuteSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalHistoryCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalSnapshotCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.InternalSyncHubCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ListLocksCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.MarkNextChangesetRanCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.MarkNextChangesetRanSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RegisterChangelogCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ReleaseLocksCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackCountCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackCountSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackToDateCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.RollbackToDateSqlCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.SnapshotCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.SnapshotReferenceCommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.StartH2CommandStep
[2023-05-10 12:27:56] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.StatusCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.SyncHubCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.TagCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.TagExistsCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UnexpectedChangesetsCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateCountCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateCountSqlCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateSqlCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateTestingRollbackCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateToTagCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.UpdateToTagSqlCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.ValidateCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.ChangeExecListenerCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.DatabaseChangelogCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.DbUrlConnectionCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.DiffOutputControlCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.LockServiceCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.OutputWriterCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.PreCompareCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.ReferenceDbUrlConnectionCommandStep
[2023-05-10 12:27:57] FINE [liquibase.servicelocator] Loaded liquibase.command.CommandStep instance liquibase.command.core.helpers.ShowSummaryArgument
[2023-05-10 12:27:57] INFO [liquibase.ui] Liquibase: Der Befehl 'generateChangeLog' wurde erfolgreich ausgeführt.

Any ideas?

答案1

得分: 0

使用新的类替换对以下方法的调用:

liquibase.integration.commandline.Main

新类为:

liquibase.integration.commandline.LiquibaseCommandLine
英文:

Replace the call to:

liquibase.integration.commandline.Main

with the newer class:

liquibase.integration.commandline.LiquibaseCommandLine

huangapple
  • 本文由 发表于 2023年5月10日 18:36:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76217391.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定