grails / grails-database-migration

Grails® framework Database Migration Plugin
Apache License 2.0
98 stars 115 forks source link

Migration not working with Grails 6 on Tomcat 9 #353

Open Lastone17 opened 5 months ago

Lastone17 commented 5 months ago

Steps to Reproduce

  1. build war (grails war)
  2. try to deploy war on tomcat

Actual Behaviour

I am aware of the issue with the plugin, so I added: implementation ('org.grails.plugins:database-migration:4.2.1') { exclude module: 'spring-boot-cli' } implementation 'org.liquibase:liquibase-core:4.19.0'

Also using this liquibase-core. If i run it locally in intellij everything is fine but on Tomcat i get: liquibase.exception.ChangeLogParseException: liquibase.exception.SetupException: Non-existent directory: C:\Program%20Files\Tomcat\apache-tomcat-9.0.86\webapps\<appname>\WEB-INF\classes

Environment Information

keithdv commented 4 months ago

I am having a very similar issue. I get the following error when I try to run the war. I get the same error if I put in an erroneous filename for updateOnStartFileName. I am completely stuck please help!

Caused by: java.util.NoSuchElementException: Cannot access first() element from an empty Iterable at org.codehaus.groovy.runtime.DefaultGroovyMethods.first(DefaultGroovyMethods.java:10425) at org.codehaus.groovy.runtime.dgm$289.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:247) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)

galexey1986 commented 3 months ago

When we migrated to Grails 6 we encountered and issue, as for grails 6.1.2 + they removed 'grails-shell' still it is required by DB plugin of 4.2.1. The only solution that we were able to find was to downgrade Grails to 6.1.1. (and wait till the 5.0 release for plugin where this issue is fixed) Our environment: grails 6.1.1 + java 17 + tomcat 9