Unit tests print exception after upgrading Liquibase to 3.2.2

I have a boot / linibase spring application and after upgrading liquibase to 3.2.2 the unit tests start to print this exception, but the tests still pass:


[WARN] liquibase - Error initializing SpringLiquibase
java.io.FileNotFoundException: ServletContext resource [/] cannot be resolved to URL because it does not exist
    at org.springframework.web.context.support.ServletContextResource.getURL(ServletContextResource.java:156) ~[spring-web-4.0.7.RELEASE.jar:4.0.7.RELEASE]
    at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.init(SpringLiquibase.java:74) [liquibase-core-3.2.2.jar:na]
    at liquibase.resource.AbstractResourceAccessor.(AbstractResourceAccessor.java:19) [liquibase-core-3.2.2.jar:na]
    at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.(SpringLiquibase.java:64) [liquibase-core-3.2.2.jar:na]
    at liquibase.integration.spring.SpringLiquibase.createResourceOpener(SpringLiquibase.java:388) [liquibase-core-3.2.2.jar:na]
    at liquibase.integration.spring.SpringLiquibase.createLiquibase(SpringLiquibase.java:349) [liquibase-core-3.2.2.jar:na]
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:300) [liquibase-core-3.2.2.jar:na]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) [spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) [spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
    at ...

      

+3


source to share


1 answer


Spring Boot does not currently support Liquibase 3.2.2. I haven't seen the exact error you posted in the question, but I suspect this is another symptom of incompatibility between Liquibase 3.0.x and 3.2.x.

To be on the safe side, you should stick with Liquibase 3.0.x, although I believe 3.1.x might work as well.



There is an open Spring Boot issue describing some issues with 3.2.x. There is also an open Spring Boot Boot Request that provides compatibility with Liquibase 3.2.x. It is slated for inclusion in Spring Boot 1.2, which should be released in Novemeber.

+4


source







All Articles