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

pact-jvm-server cannot create v4 Pact #1829

Open
dennisheinlein opened this issue Sep 26, 2024 · 0 comments
Open

pact-jvm-server cannot create v4 Pact #1829

dennisheinlein opened this issue Sep 26, 2024 · 0 comments

Comments

@dennisheinlein
Copy link

When i try to POST a v4Pact to the /create endpoint, i get the following error in the log of the pact-jvm-server:

java.lang.ClassCastException: class au.com.dius.pact.core.model.V4Pact cannot be cast to class au.com.dius.pact.core.model.RequestResponsePact (au.com.dius.pact.core.model.V4Pact and au.com.dius.pact.core.model.RequestResponsePact are in unnamed module of loader 'app')

I tried with different Versions of the pact-jvm-server, the error appears in all versions, including 4.6.14.

The error can be reproduced with this pact:
{ "consumer": { "name": "consumer" }, "provider": { "name": "provider" }, "metadata": { "pactSpecification": { "version": "4.0.0" } }, "interactions": [ { "type": "Synchronous/HTTP", "description": "Test", "providerStates": [ { "name": "State" } ], "request": { "method": "GET", "path": "/endpoint" }, "response": { "body": { "content": { "key": "value" } }, "headers": { "Content-Type": "application/json" }, "status": 200 } } ] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant