gpt4 book ai didi

oracle - Liquibase 更新错误

转载 作者:行者123 更新时间:2023-12-04 09:31:26 25 4
gpt4 key购买 nike

我正在尝试使用 Liquibase 在数据库中创建几个表。

一些背景:我在本地 h2 数据库上执行了相同的 changelog.xml 文件,并且成功运行。我用松鼠测试了下面的oracle数据库、用户名、密码和驱动程序,它连接成功。所以我相当肯定我正面临 liquibase 问题。我做了大量的 google-ing,但在 SO 或其他任何地方都没有找到任何可以帮助我的东西。

我在命令提示符中输入了以下内容:

C:\>java -jar liquibase-core-2.0.5.jar --driver=oracle.jdbc.OracleDriver
--classpath=ojdbc6-11.2.0.3.0.jar --changeLogFile=changelog.xml
--url="jdbc:oracle:thin:@myDatabase"
--username=myUsername --password=myPassword --logLevel=debug update

哪个返回:
DEBUG 9/30/13 3:09 PM:liquibase: Unable to load/access Apache Derby driver class
to check version
DEBUG 9/30/13 3:09 PM:liquibase: Connected to myUsername@jdbc:oracle:thin:@myDatabase
DEBUG 9/30/13 3:10 PM:liquibase: Executing QUERY database command: SELECT LOCKED
FROM DATABASECHANGELOGLOCK WHERE ID=1 FOR UPDATE
Liquibase Update Failed: Empty result set, expected one row
SEVERE 9/30/13 3:10 PM:liquibase: Empty result set, expected one row
liquibase.exception.LockException: liquibase.exception.DatabaseException: Empty
result set, expected one row
at liquibase.lockservice.LockService.acquireLock(LockService.java:121)
at liquibase.lockservice.LockService.waitForLock(LockService.java:61)
at liquibase.Liquibase.update(Liquibase.java:102)
at liquibase.integration.commandline.Main.doMigration(Main.java:825)
at liquibase.integration.commandline.Main.main(Main.java:134)
Caused by: liquibase.exception.DatabaseException: Empty result set, expected one
row
at liquibase.util.JdbcUtils.requiredSingleResult(JdbcUtils.java:124)
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:
159)
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:
167)
at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:
163)
at liquibase.lockservice.LockService.acquireLock(LockService.java:96)
... 4 more

最佳答案

我在这里找到了答案:http://forum.liquibase.org/topic/message-regarding-an-empty-result-set-for-databasechangeloglock

删除 databasechangeloglock 表为我解决了这个问题。

关于oracle - Liquibase 更新错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19119115/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com