【发布时间】:2019-09-02 16:55:57
【问题描述】:
我正在尝试运行 liquibase 以生成我当前数据库的变更日志,但我收到以下错误并且不知道如何解决它。
Unexpected error running Liquibase: liquibase.exception.DatabaseException: Connection could not be created to jdbc:postgres://kbjoxiifqvunac:ef1f6ba0b9633d5951c6f4a28897fe390fdf2a7f4189320569d303531899e843@ec2-54-217-235-159.eu-west-1.compute.amazonaws.com:5432/d1pdhars1kb6ep with driver org.postgresql.Driver. Possibly the wrong driver for the given database URL
liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Connection could not be created to jdbc:postgres://kbjoxiifqvunac:ef1f6ba0b9633d5951c6f4a28897fe390fdf2a7f4189320569d303531899e843@ec2-54-217-235-159.eu-west-1.compute.amazonaws.com:5432/d1pdhars1kb6ep with driver org.postgresql.Driver. Possibly the wrong driver for the given database URL
at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:135) ~[liquibase.jar:na]
at liquibase.integration.commandline.Main.doMigration(Main.java:977) [liquibase.jar:na]
at liquibase.integration.commandline.Main.run(Main.java:209) [liquibase.jar:na]
at liquibase.integration.commandline.Main.main(Main.java:132) [liquibase.jar:na]
Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Connection could not be created to jdbc:postgres://kbjoxiifqvunac:ef1f6ba0b9633d5951c6f4a28897fe390fdf2a7f4189320569d303531899e843@ec2-54-217-235-159.eu-west-1.compute.amazonaws.com:5432/d1pdhars1kb6ep with driver org.postgresql.Driver. Possibly the wrong driver for the given database URL
at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:259) ~[liquibase.jar:na]
at liquibase.database.DatabaseFactory.openDatabase(DatabaseFactory.java:149) ~[liquibase.jar:na]
at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:100) ~[liquibase.jar:na]
... 3 common frames omitted
Caused by: liquibase.exception.DatabaseException: Connection could not be created to jdbc:postgres://kbjoxiifqvunac:ef1f6ba0b9633d5951c6f4a28897fe390fdf2a7f4189320569d303531899e843@ec2-54-217-235-159.eu-west-1.compute.amazonaws.com:5432/d1pdhars1kb6ep with driver org.postgresql.Driver. Possibly the wrong driver for the given database URL
at liquibase.database.DatabaseFactory.openConnection(DatabaseFactory.java:254) ~[liquibase.jar:na]
... 5 common frames omitted
我已经运行了以下命令
liquibase --driver=org.postgresql.Driver --changeLogFile=changelog.xml --url=jdbc:postgres://user:password@ec2-54-217-235-159.eu-west-1.compute.amazonaws.com:5432/dbhost generateChangeLog
我省略了类路径标志,因为我将 postgres 驱动程序放在我的 liquibase 的 lib 文件夹中,并且根据文档它应该扫描它。
我在 Windows、liquibase 版本 3.8.0 和 postgres-drivers 42.1.1 上运行。有任何想法吗?在此先感谢您的帮助
【问题讨论】:
标签: liquibase