liquibase / liquibase-neo4j

Neo4j extension for Liquibase
Apache License 2.0
49 stars 11 forks source link

Cannot cast 'java.time.ZonedDateTime' to 'java.sql.Timestamp' #590

Closed fanat12k closed 6 months ago

fanat12k commented 6 months ago

We are trying to update to the last version liquibase from 4.18.0 to 4.27.0 and we encountered this problem after the update:

How you see it in the screenshot - Cannot cast 'java.time.ZonedDateTime' to 'java.sql.Timestamp'

1

But when you change the type to ZonedDateTime, everything works as it should; by default, the function datetime() in neo4j returns ZonedDateTime. Any ideas?

2
sobczynskipio commented 6 months ago

Just to comment on this as I work on the same project as the issue reporter. Liquibase-neo4j from version 4.19.0 and up can not read changsets it saved itself because of the issue described. Neo4j version used is 4.4.10-enterprise

fbiville commented 6 months ago

Hello, thanks for the report. This seems to be exactly the same as https://github.com/liquibase/liquibase-neo4j/issues/314.

The following documentation section explains how to configure the JDBC connector so that this particular conversion issue goes away.

The summary is to drop the third-party Neo4j JDBC connector and use the built-in connector instead.

Does that help? If not, can you please share how you configure the Liquibase connection?

fanat12k commented 6 months ago
Знімок екрана 2024-04-03 о 14 20 07
fbiville commented 6 months ago

Thanks, the driverClassName needs to change to liquibase.ext.neo4j.database.jdbc.Neo4jDriver.

fanat12k commented 6 months ago

Thank you it helped

fbiville commented 6 months ago

Great! Is there anything else I can help with? Otherwise, can I go ahead and close this?

fbiville commented 6 months ago

Closing this for now, feel free to reopen the issue if you need a follow-up.