-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
[ERROR] Could not initialize class net.serenitybdd.rest.utils.RestSpecificationFactory #2771
Comments
be sure that u don't have a different serenity version in any project, also a different rest assured, do a dependencies analysis. |
Ahh that is helpful to know, so will a dependency discrepancy cause the tests to fail? For instance, if this repo is running serenity v3.2.3, but is depending on integration tests of a repo that is on serenity v.2.0.70? My initial thought was that as long as the other repo was working in isolation, it wouldn't cause any issues, but is that not correct? |
the problem is that if in project A u have a dependency of serenity that transitively depends for example on rest-assured 4, but in the project B u have another serenity version that has rest-assured 3, then u will have conflicting versions, so in that case, u will have to add project b as dependency and exclude the transitive dependencies so at resolution only the ones of project A are used. but as mention try to check first, on your dependencies which rest-assured version is present. |
Ahh okay that makes a ton of sense! I can try this to see if it may resolve the issue, here are the rest-assured dependencies for both of my projects. It seems that tehy are using 3.3 for rest assured? And also, project A doens't directly use rest Assured (it only uses Appium) all of the API calls are made using dependencies from Project B. Project A: +- net.serenity-bdd:serenity-rest-assured:jar:3.2.3:compile Project B: [INFO] +- net.serenity-bdd:serenity-rest-assured:jar:2.0.70:compile |
I have an issue where I keep running into this above "Could not initialize class net.serenitybdd.rest.utils.RestSpecificationFactory" issue. I am running a Serenity, Appium Cucumber project with Serenity 3.2.3, Appium v2, and Cucumber 7(as well as SpringBoot 5.2.3) on JDK 17.
I've noticed, that when I switch my JDK to version 11, I get this error instead of the above.
java.util.Set io.restassured.config.LogConfig.blacklistedHeaders()
The error is specifically occurring when trying to make a call using the SharedLibrary of the integration tests that are imported from another project.
Would anyone be able to help me troubleshoot the issue here?
4.0.0
The text was updated successfully, but these errors were encountered: