I found this problem when i am using maven project that is built as a one-jar via corresponding maven plugin. I am having liquibase as dependency in pom.xml and maven builds it as jar file and this jar resides inside maven one-jar file as a library. When liquibase classes are used they can’t be found because liquibase classloader is trying to find them in current jar that is maven one-jar, but not in liquibase.jar.
I would like to know is it bug of liquibase or did it develop so? My project is very dependent on this.
OK - can you provide any more information… Does not work for me… Thanks for any information… (FYI - it works fine when I run it in Eclipse - just not when bundled with one-jar.)
Maven Dependency
<groupId>org.dstovall</groupId>
>
<version>1.4.4</version>
Exception in thread “main” java.lang.reflect.InvocationTargetException
at liquibase.database.DatabaseFactory.findCorrectDatabaseImplementation(DatabaseFactory.java:71)
Well, i comletely forgot about this issue and didn’t think that anyone would write here
It works correct in IDE because there is a difference how a classloader works in IDE and in one-jar. I can’t remember how it exactly works actually. You can try to debug and find out
I can advice you only change one-jar to maven-shade plugin if one-jar is not critical.