Liquibase Neo4j Docker: Incompatibility with 4.23.0
rohitbatta opened this issue ยท 9 comments
I have created docker image using base image as
FROM liquibase/liquibase
RUN lpm add liquibase-neo4j --global
COPY ./neo4j-java-driver.4.4.11.jar /liquibase/lib/neo4j-java-driver.4.4.11.jar
COPY ./reactive-streams-1.0.4.jar /liquibase/lib/reactive-streams-1.0.4.jar
CMD ["sh", "-c", "docker-entrypoint.sh"]
Now, when i do some testing using liquibase commands.
Following commands are working fine.
liquibase history
liquibase status
But, when i try to run this liquibase updateSQL
on docker terminal.
Then following error appears.
Liquibase Version: 4.23.0
Liquibase Open Source 4.23.0 by Liquibase
Unexpected error running Liquibase: Receiver class liquibase.ext.neo4j.changelog.Neo4jChangelogHistoryService does not define or inherit an implementation of the resolved method 'abstract boolean isDatabaseChecksumsCompatible()' of interface liquibase.changelog.ChangeLogHistoryService
All required env variables are already set to the container.
I have verified in mentioned class and indeed that method is not implemented.
Logs from docker container.
[2023-07-25 12:39:32] FINE [liquibase.servicelocator] Loaded liquibase.changelog.ChangeLogHistoryService instance liquibase.changelog.StandardChangeLogHistoryService
[2023-07-25 12:39:32] FINE [liquibase.servicelocator] Loaded liquibase.changelog.ChangeLogHistoryService instance liquibase.ext.neo4j.changelog.Neo4jChangelogHistoryService
[2023-07-25 12:39:32] FINE [liquibase.command] Executing internal command changeExecListener
[2023-07-25 12:39:32] FINE [liquibase.command] Executing internal command updateSql migrateSql
[2023-07-25 12:39:32] INFO [liquibase.command] Command execution complete
[2023-07-25 12:39:32] SEVERE [liquibase.integration] Receiver class liquibase.ext.neo4j.changelog.Neo4jChangelogHistoryService does not define or inherit an implementation of the resolved method 'abstract boolean isDatabaseChecksumsCompatible()' of interface liquibase.changelog.ChangeLogHistoryService.
java.lang.AbstractMethodError: Receiver class liquibase.ext.neo4j.changelog.Neo4jChangelogHistoryService does not define or inherit an implementation of the resolved method 'abstract boolean isDatabaseChecksumsCompatible()' of interface liquibase.changelog.ChangeLogHistoryService.
at liquibase.command.core.AbstractUpdateCommandStep.isUpToDateFastCheck(AbstractUpdateCommandStep.java:194)
at liquibase.command.core.AbstractUpdateCommandStep.isUpToDate(AbstractUpdateCommandStep.java:249)
at liquibase.command.core.AbstractUpdateCommandStep.run(AbstractUpdateCommandStep.java:60)
at liquibase.command.core.UpdateSqlCommandStep.run(UpdateSqlCommandStep.java:60)
at liquibase.command.CommandScope.execute(CommandScope.java:213)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:55)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:24)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$2(LiquibaseCommandLine.java:381)
at liquibase.Scope.child(Scope.java:206)
at liquibase.Scope.child(Scope.java:182)
at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$3(LiquibaseCommandLine.java:356)
at liquibase.Scope.child(Scope.java:206)
at liquibase.Scope.child(Scope.java:182)
at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:354)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:94)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:107)
Unexpected error running Liquibase: Receiver class liquibase.ext.neo4j.changelog.Neo4jChangelogHistoryService does not define or inherit an implementation of the resolved method 'abstract boolean isDatabaseChecksumsCompatible()' of interface liquibase.changelog.ChangeLogHistoryService.
java.lang.AbstractMethodError: Receiver class liquibase.ext.neo4j.changelog.Neo4jChangelogHistoryService does not define or inherit an implementation of the resolved method 'abstract boolean isDatabaseChecksumsCompatible()' of interface liquibase.changelog.ChangeLogHistoryService.
at liquibase.command.core.AbstractUpdateCommandStep.isUpToDateFastCheck(AbstractUpdateCommandStep.java:194)
at liquibase.command.core.AbstractUpdateCommandStep.isUpToDate(AbstractUpdateCommandStep.java:249)
at liquibase.command.core.AbstractUpdateCommandStep.run(AbstractUpdateCommandStep.java:60)
at liquibase.command.core.UpdateSqlCommandStep.run(UpdateSqlCommandStep.java:60)
at liquibase.command.CommandScope.execute(CommandScope.java:213)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:55)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:24)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$2(LiquibaseCommandLine.java:381)
at liquibase.Scope.child(Scope.java:206)
at liquibase.Scope.child(Scope.java:182)
at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$3(LiquibaseCommandLine.java:356)
at liquibase.Scope.child(Scope.java:206)
at liquibase.Scope.child(Scope.java:182)
at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:354)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:94)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:107)
Am I missing something here?
After doing some more research, I have found that problem is due to base image liquibase/liquibase:4.23.0
In this version, interface ChangeLogHistoryService
is updated and a new method named as isDatabaseChecksumsCompatible
is declared.
Method declared in 4.23.0
or master
https://github.com/liquibase/liquibase/blob/a417465f14b0ffcfe8e4e380a224c2bdf4095de5/liquibase-standard/src/main/java/liquibase/changelog/ChangeLogHistoryService.java#L81
When I change base image to liquibase/liquibase:4.21.1-alpine
and then liquibase-neo4j-ext version to 4.21.1.2
, then updateSQL
command is also working.
Method is not declared in version 4.22.0
https://github.com/liquibase/liquibase/blob/v4.22.0/liquibase-standard/src/main/java/liquibase/changelog/ChangeLogHistoryService.java
I think, if we need to use version 4.23.0
from docker image then Neo4jChangelogHistoryService
class should implement the method mentioned in ChangeLogHistoryService
Hello, Liquibase core 4.23.0 introduces some breaking changes that Liquibase Neo4j cannot support at the moment.
I'm waiting for Liquibase core 4.23.1 to push a release for the Neo4j extension.
You need to downgrade to Liquibase 4.22 or earlier for now, I'm afraid.
@fbiville , thanks, Indeed it is working with old base imageliquibase/liquibase:4.21.1-alpine
. I have validated that and currently using that one.
If you need, then we could keep this ticket open or you can close it if it has been already raised earlier. ๐
It's been discussed in another ticket, but let's keep this one open for now :)
4.23.1 release is underway.
Just tested, docker image version 4.23.1 is still not correct and pointed to 4.23.0
@rohitbatta forwarded to the core team, I'll let you know of any updates.
@fbiville Image for liquibase-4.23.1 has been corrected last week and I am able to use that base image now.
This ticket has been fixed last week. liquibase/liquibase#4731
Following is working.
FROM liquibase/liquibase:4.23.1-alpine
ARG LIQUIBASE_NEO4J_VERSION=4.23.1
RUN lpm update && lpm add --global liquibase-neo4j@$LIQUIBASE_NEO4J_VERSION
COPY ./neo4j-java-driver-all-5.12.0.jar /liquibase/lib/neo4j-java-driver-all-5.12.0.jar
COPY ./reactive-streams-1.0.4.jar /liquibase/lib/reactive-streams-1.0.4.jar
ADD ./liquibase/changelog /liquibase/changelog
CMD ["sh", "-c", "docker-entrypoint.sh"]
Thanks @rohitbatta, I'll close this issue then.
Out of interest, is there a reason you explicitly include the Neo4j driver JAR. Is this because Liquibase Neo4j currently depends on the v4 driver instead of v5?