-
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
java.lang.NoClassDefFoundError: Could not initialize class io.restassured.RestAssured #4
Comments
Most likely the wrong version of RestAssured is being used. Do a dependency analysis or print the effective pom to see what version is being used; it needs to be the one used by your Serenity version. |
Hi John, We are upgrading the versions from serenity 1.2.2 to 2.0.29 and rest assured we were using 2.4.1. And in the effective POM and mvn dependency:tree also I can see only one rest is present, which is serenity rest. Please help me in this regard. |
From memory, Serenity uses RestAssured 3.0.5. "java.lang.NoClassDefFoundError: Could not initialize class io.restassured.RestAssured" indicates a class version conflict. Without working with your project directly, it is hard to say more. |
I am also facing same issue. Can someone help on this ? |
Following dependencies resolved my problem. Use consistent versions might help. I was using different versions for these 3 dependencies.
|
Hi John,
I am getting the below issue and I have tried all the options available. But unable to get it solved.
Please take a look into it and provide the solution. I have attached my POM here.
I am using the latest serenity 2.0.29.
16:08:31.213 [main] DEBUG c.n.a.rest.controller.RestBase - AutomationHome Path =C:\Users\nishiveg\GitWorkSpace\Final Checkin\AppAutomationServer
16:08:31.218 [main] DEBUG c.n.a.rest.controller.RestBase - Depolyment is impact less
16:08:32.281 [main] WARN net.thucydides.core.pages.Pages - Failed to instantiate page of type class com.nokia.automation.ui.isa.pageobject.AddCameraPage ({})
java.lang.NoClassDefFoundError: Could not initialize class io.restassured.RestAssured
at io.restassured.builder.RequestSpecBuilder.(RequestSpecBuilder.java:79)
at com.nokia.automation.rest.isa.rest.controller.IsaApiResponse.(IsaApiResponse.java:63)
at com.nokia.automation.ui.isa.pageobject.AddCameraPage.(AddCameraPage.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
pom.zip
The text was updated successfully, but these errors were encountered: