Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find parser that supports .groovy

When I'm trying to start changelog.groovy via liquibase command line it tells me that

Unexpected error running Liquibase: Cannot find parser that supports changelog.groovy

I'm doing the next: java -jar liquibase.jar update

My liquibase.properties are:

  • driver=org.postgresql.Driver
  • classpath=C:\Users\Andrii\org.postgresql.Driver.jar;C:\Users\Andrii\liquibase-3.5.1-bin\lib\liquibase-groovy-dsl-1.2.2-SNAPSHOT.jar
  • changeLogFile=D:\changelog.groovy
  • url=jdbc:postgresql://localhost:5432/test
  • username=postgres
  • password=rup

It finds those jars since if I change something in that path it will tell that jars cannot be found.

I downloaded the groovy-liquibase-dsl project, build it and added a jar into classpath. What am I doing wrong?

like image 280
user2620644 Avatar asked Oct 24 '25 18:10

user2620644


1 Answers

To make it work, you need to additionally include groovy and groovy-sql jars in Liquibase's classpath.

So say you store all the jars in C:\Users\Andrii\LiquibaseDependencies, update your the classpath property of your file as such:

classpath=C:\Users\Andrii\LiquibaseDependencies\org.postgresql.Driver.jar;
C:\Users\Andrii\LiquibaseDependencies\liquibase-groovy-dsl-1.2.1.jar;
C:\Users\Andrii\LiquibaseDependencies\groovy-2.4.6.jar;
C:\Users\Andrii\LiquibaseDependencies\groovy-sql-2.4.6.jar
like image 101
sofiaguyang Avatar answered Oct 26 '25 09:10

sofiaguyang