-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE on running liquibase:diff when using >= Liquibase-core 3.6 #195
Comments
Hibernate4 btw! |
Hy, can you add your pom.xml file? |
What i did to make it work was adding some dependencies directly to the plugin configuration: I looked further into my issue and noticed that the pull request for the update to liquibase 3.6 on master was not backported to the hibernate 4 branch. Thanks in advance! |
I use hibernate4 version. here is a part of my pom: I run mvn process-test-resources and I get: : Error setting up or running Liquibase: liquibase.command.CommandExecutionException: java.lang.NullPointerException |
Yes, it is currently NOT working with liquibase-core 3.6 or higher. It works with liquibase-core 3.5.5. That's what im trying to point out with my issue ;) |
I have used the pom file posted by you and I get: |
Try setting the liquibase-maven-plugin version to 3.5.5 aswell. And use the hibernate/spring/... versions that you use in the rest of your project. |
I set to 3.5.5, also to 3.5.0 and any result. |
Maybe I can help you if you post your POM and liquibase properties. |
I finally solved all those error I am getting with liquibase generation. You pointed me to the right direction, that there was a problem with the versions. In the end I used: Liquibase Maven Dependencies: I just looked at the latest liquibase post about hibernate and saw that version 3.7 supports liquibase 3.6. Some of them can obviously be changed like postgresql or maybe hibernate version. But I am never touching anything with these versions anymore... Edit: |
I commented already in the other issue, referencing this, but I'd like to provide my testing pom.xml for further elaboration:
As already explained in the other thread, I keep getting an NPE while getting the schema |
I got past the NPE but there seems to be another error after that. There is also an open issue for it #170 Here is my pom.xml. The important parts are the spring boot dependencies inside liquibase hibernate.
|
Anyone able to confirm if using liquibase 3.8.3 and spring-boot 2.2 issue is fixed? |
I came across this issue using
and got the stacktrace
As hTnevS mentioned, adding dependencies to worked for me. This plugin configuration inside ...
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>4.4.1</version>
<dependencies>
<dependency>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-hibernate5</artifactId>
<version>4.4.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.3.8</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.8</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>5.3.8</version>
</dependency>
</dependencies>
</plugin>
...
</plugins>
</build> The referenced Spring dependencies match the corresponding versions in Spring Boot 2.5.2 |
same here, but when running from the commandline (liquibase cli) Liquibase Version: 4.4.2 liquibase.properties:
|
This seems to be not fixed, or do i have wrong configuration, what am I doing wrong here. Edit: added plugins also
Error
|
@otskarli I fixed the same error by adding
The part of the Dialects needs to be in the classpath, I think it could be down to more specific libraries, but it worked that way with my project |
@SpectralAngel , thank you. Helped me as well. |
@SpectralAngel, thanks worked like this (for maven)
|
@taichouvik thanks, man! This worked for me in the Maven project as well. |
@SpectralAngel , thanks a lot. I'm using gradle with kotlin so adding |
So in short, using an url that points to spring objects requires spring-data libraries to be included as dependencies too. |
I get a NullPointerException when executing mvn liquibase:diff. This happens only when using liquibase-core 3.6.0 or above. Tested it with liquibase-core 3.5.5, that worked with my configuration.
Those are the contents of my liquibase.properties:
I tried several configurations but as i pointed out, liquibase:diff worked without trouble on version 3.5.5 and below.
┆Issue is synchronized with this Jira Bug by Unito
The text was updated successfully, but these errors were encountered: