运行liquibase时在liquibase.database.DatabaseFactory.register上获取java.lang.AbstractMethodError

时间:2015-07-10 04:58:21

标签: liquibase

您好我最近从liquibase 2.0.3更新到3.3.3。 所以当对任何数据库运行liquibase时,我收到以下错误。

SEVERE 7/10/15 9:47 AM: liquibase: Unknown Reason
java.lang.AbstractMethodError
    at liquibase.database.DatabaseFactory.register(DatabaseFactory.java:87)
    at liquibase.database.DatabaseFactory.<init>(DatabaseFactory.java:29)
    at liquibase.database.DatabaseFactory.getInstance(DatabaseFactory.java:40)
    at liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(CommandLineUtils.java:50)
    at liquibase.integration.commandline.Main.doMigration(Main.java:884)
    at liquibase.integration.commandline.Main.run(Main.java:175)
    at liquibase.integration.commandline.Main.main(Main.java:94

我正在从命令提示符运行,如下所示:

  

liquibase --logLevel = severe --logFile = tesaaa1   --classpath = d:\ JenzabarFull \ NGP-配置\主干\ JX-financialaid \ JX-financialaid耳\目标\ JX-financialaid耳-1.0-SNAPSHOT.ear   更新

liquibase属性文件是:

  

changeLogFile = changelog.xml驱动程序:org.postgresql.Driver url:   jdbc:postgresql:// localhost:5433 / NGP_DB用户名:jdbcusr密码:   密码defaultSchemaName:ngp

1 个答案:

答案 0 :(得分:1)

只要查看liquibase代码并尝试确定可能出现的问题,我认为liquibase可能没有识别出正确的数据库。

您可以尝试将数据库类作为参数添加到liquibase命令行中,如下所示:--databaseClass=liquibase.database.core.PostgresDatabase