2
votes

Hi i have recently updated from liquibase 2.0.3 to 3.3.3. so while running the liquibase against any database i am getting the following error.

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

)

I am running from command prompt like this :

liquibase --logLevel=severe --logFile=tesaaa1 --classpath=D:\JenzabarFull\ngp-configurations\trunk\jx-financialaid\jx-financialaid-ear\target\jx-financialaid-ear-1.0-SNAPSHOT.ear update

The liquibase properties file is :

changeLogFile=changelog.xml driver: org.postgresql.Driver url: jdbc:postgresql://localhost:5433/NGP_DB username: jdbcusr password: password defaultSchemaName: ngp

1
Do you have the old liquibase 2.x jar in your classpath somewhere?Dave Bower
No, its having the latest liquibase core jar.user3836455
When I had a similar issue I discovered the culprit (2 different versions of liquibase on the classpath) by step debugging through the "register" method mentioned in Jens' answer.Dave Bower
Is this a grails app? In which case you have liquibase-core-2.0.5.jar in the Grails User Library. I have no clue how to remove it.Steve Gelman

1 Answers

1
votes

Just by looking at the liquibase code and trying to determine what could go wrong I think liquibase might not have identified the correct database.

You could try to add the database class as a parameter to your liquibase commandline, like this: --databaseClass=liquibase.database.core.PostgresDatabase.