Rollback programmatically

Both the 2 issues you mentioned above are too strange. with 3.10.0, it’s working for me. Also about the contexts, I don’t see any issue created so far from anyone. we must be missing out on some point in implementation.

Can you try placing your changeset inside the project and executing it? Instead of executing changeset from a jar?

Sorry didn’t understand the last part

My changeset is inside the project. In the folder resources.
When I say run through the jar I meant convert my project into a jar and run it

As you mentioned earlier, I assume your changesets are packaged inside a JAR file? Are they? OR am I getting this statement of yours wrong?

With the above statement did you mean when tried it through JAVA API?

also with 3.10.0 I am getting a exceptioon

Exception in thread "main" java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.lang.String (java.time.LocalDateTime and java.lang.String are in module java.base of loader 'bootstrap')
	at liquibase.changelog.StandardChangeLogHistoryService.getRanChangeSets(StandardChangeLogHistoryService.java:328)
	at liquibase.changelog.AbstractChangeLogHistoryService.upgradeChecksums(AbstractChangeLogHistoryService.java:66)
	at liquibase.changelog.StandardChangeLogHistoryService.upgradeChecksums(StandardChangeLogHistoryService.java:297)
	at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:1174)
	at liquibase.Liquibase.update(Liquibase.java:192)
	at liquibase.Liquibase.update(Liquibase.java:178)
	at liquibase.Liquibase.update(Liquibase.java:174)
	at liquibase.Liquibase.update(Liquibase.java:167)
	at com.petapilot.migrations.MigrationsApplication.main(MigrationsApplication.java:62)

This is the line where it happens

liquibase.update("");

A lot of confusion here.

It worked for me on postgreSQL DB, however you are trying with SQL DB.
My project is pure Java project. I assume your’s is using Spring too. (Please correct me if I’m wrong here)

I saw an issue here, talks about the one you just mentioned in the previos comment.

As per the discussion on this issue, it seems to be fixed in 4.3.5/4.4.0 release I guess.

Would you mind checking with these versions once? :slight_smile:

Don’t know why but changing versions is causign troubles

Tried the path to my changelog like this

13:20:14.964 [main] ERROR com.petapilot.migrations.MigrationsApplication - The file db/changelog/master/db.changelog-master.xml was not found in
Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter.

and like this classpath:/db/changelog/master/db.changelog-cmd.xml

with version 4.3.1 I can use the classpath approach

Think I might have found the problem.
So I tried to change the path in includeAll in my masterChangelog to a non existing folder.
Runned the programm and it didn’t crash so I assume that the path is not correct

great!
atleast we get could get past one issue :smiley:

let’s target the next one now. Running update with context=""

Still the same problem. I can’t seem to get right with the path

My master changelog is in the path migrations-0.0.1-SNAPSHOT.jar\BOOT-INF\classes\db\changelog\master\db.changelog-master.xml

And my folder is in the path migrations-0.0.1-SNAPSHOT.jar\BOOT-INF\classes\db\changelog\migrations\Test

So the value of path in includeAll shouldn’t be ../migrations/Test ?

yeah, the path seems correct to me. Can you try including a single file from this directory first? Let’s confirm if it is able to find a single file?

Also could you please paste the exact error you get with includeall ?

when i try to rollback when Context is present in changeset then it shows) changset executed and rollback command executed successfully. But i dont see any change in the database.
I am using liquibase 4.24