-
Notifications
You must be signed in to change notification settings - Fork 115
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
JsonUnit 4.0.0: causes java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanFactoryInitializer #855
Comments
This comment has been minimized.
This comment has been minimized.
JsonUnit is dependent on Spring 6.2 so maybe it's pulling a newer version of a Spring module. It should not happen if you are using Spring Boot BOM. Can you check the Spring versions resolved by your build tool? |
Btw. JsonUnit should work with older version of Spring, so you can force older version |
This comment has been minimized.
This comment has been minimized.
What's you spring-test version? |
Yes, JsonUnit pulled in a newer version of spring-test. In this case you have to explicitly set the same version as the rest of spring dependencies in your Maven or Gradle file (or use Spring Boot BOM that does it for you) |
@lukas-krecan thanks I already use the spring Boot BOM:
But I had to explicitly exclude the
This solved it for me. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
You have to upgrade Jackson to at least 2.14 |
We got the Spring Boot 3.4.0 update today. Now my fix from #855 (comment) is not needed anymore. From my point of view this ticket can be closed. |
This comment has been minimized.
This comment has been minimized.
Let's keep it open for a while, so others have an easier time finding it. Thanks |
Describe the bug
AssertJ, SpringMVC
tbd. (Need some time to create this)
Until json-unit 3.5.0 all tests did run fine, since 4.0.0 I get the following Exception in my Spring Tests:
Using Spring Boot 3.3.5.
The text was updated successfully, but these errors were encountered: