Folks, since upgrading several apps to Grails 5, w...
# questions
t
Folks, since upgrading several apps to Grails 5, we’ve had to disable migrations in order to start the app. Any clues as to why we’re getting this when we uncomment the liquibase & migration plugins? java.lang.NullPointerException at org.springframework.boot.cli.app.SpringApplicationWebApplicationInitializer.getSources(SpringApplicationWebApplicationInitializer.java:61) at org.springframework.boot.cli.app.SpringApplicationWebApplicationInitializer.onStartup(SpringApplicationWebApplicationInitializer.java:47) at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
t
I don't think we've seen that error before. One of our Grails 5.2.1 applications is using the following versions of the libraries:
Copy code
implementation 'org.grails.plugins:database-migration:4.2.1'
implementation 'org.liquibase:liquibase-core:4.19.0'
t
Same here — apologies for the scanty info I supplied, and thanks for the confirmation! I’ve found what looks like a solid workaround at https://github.com/grails/grails-database-migration/issues/353 — the key part is to exclude the spring-boot-cli that’s throwing the error from the database migration plugin:
implementation ('org.grails.plugins:database-migration:4.2.1') { exclude module: 'spring-boot-cli' }
So far, that appears to be working locally; I’m doing more testing to confirm whether that’s also true in production.
👍 1
This fix is now Confirmed — works flawlessly; breaks nothing, starts up with migrations enabled, and runs them as expected. Added some more details here, in the hopes they’ll help someone else.
👍 1