Skip to content
Advertisement

exception is java.lang.NoClassDefFoundError: liquibase/Scope

I have multimodule project using Spring Boot and liquibase. If i run it usring mvn spring-boot:run it works, but if i run it using intellej i get this error:

JavaScript

Module info of my module:

JavaScript

Any ideas how to fix it? I will aprecciate it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Advertisement

Answer

My guess is that your Liquibase files are in a folder named liquibase. Rename it to something else like liquibase-migration-files or equivalent, but definitely different from just liquibase.

My interpretation is that having a liquibase folder make the ClassLoader think the package liquibase is declared in the module where your Liquibase configuration is stored, thus the ClassLoader doesn’t try to look in the unnamed module where the Liquibase library is located.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement