Skip to content
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

Gson java.lang.NoSuchMethodError #1180

Closed
wayofthepie opened this issue Jul 31, 2020 · 2 comments
Closed

Gson java.lang.NoSuchMethodError #1180

wayofthepie opened this issue Jul 31, 2020 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@wayofthepie
Copy link

wayofthepie commented Jul 31, 2020

It seems #1077 is still an issue. I'm using the latest versions which are mentioned in that issue, at least I think I am, there are a lot of different versions now so it's not currently clear:

    testImplementation('au.com.dius.pact:provider:4.1.6')
    testImplementation('au.com.dius.pact.provider:junit5:4.1.6')
    testImplementation('au.com.dius.pact.provider:junit5spring:4.1.6')

And I'm still seeing the below:

 java.lang.NoSuchMethodError: 'com.google.gson.JsonElement com.google.gson.JsonParser.parseString(java.lang.String)'
        at au.com.dius.pact.provider.ResponseComparison$Companion.generateFullDiff(ResponseComparison.kt:89)
        at au.com.dius.pact.provider.ResponseComparison$Companion.access$generateFullDiff(ResponseComparison.kt:83)
        at au.com.dius.pact.provider.ResponseComparison.bodyResult(ResponseComparison.kt:78)
        at au.com.dius.pact.provider.ResponseComparison$Companion.compareResponse(ResponseComparison.kt:122)
        at au.com.dius.pact.provider.ProviderVerifier.verifyRequestResponsePact(ProviderVerifier.kt:521)
        at au.com.dius.pact.provider.junit5.PactVerificationContext.validateTestExecution(PactJUnit5VerificationProvider.kt:117)
        at au.com.dius.pact.provider.junit5.PactVerificationContext.verifyInteraction(PactJUnit5VerificationProvider.kt:90)

I guess, are the versions correct? Or is this an issue in the latest also? Thanks!

uglyog pushed a commit that referenced this issue Aug 8, 2020
@uglyog uglyog added the bug Indicates an unexpected problem or unintended behavior label Aug 8, 2020
@uglyog
Copy link
Member

uglyog commented Aug 9, 2020

4.1.7 has been released with Gson totally removed

@wayofthepie
Copy link
Author

Looks good now thanks! Will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants