Getting an error using pact jvm 4.3.19 where the c...
# pact-jvm
m
Getting an error using pact jvm 4.3.19 where the consumer is a 4.0 pact spec version. It seems to want a semver of 4.0.0 but the consumer publishes the contract as 4.0. This error happens when starting the contract verification on the provider:
Copy code
Unexpected character 'EOI(null)' at position '3', expecting '[DOT]'
	at app//com.github.zafarkhaja.semver.VersionParser.consumeNextCharacter(VersionParser.java:516)
	at app//com.github.zafarkhaja.semver.VersionParser.parseVersionCore(VersionParser.java:288)
	at app//com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:255)
	at app//com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:195)
	at app//com.github.zafarkhaja.semver.Version.valueOf(Version.java:265)
	at app//au.com.dius.pact.core.model.DefaultPactReader.loadPact(PactReader.kt:203)
This seems to be a specific issue in
junit5spring
lib for jvm-provider, everything works fine with
junit5
lib.
u
The Pact spec versions on not semver. That stack trace is not from pact jvm 4.3.19, but must be from a version prior to 4.2.0-beta.1. In that version the semver parser (shown above in the stack trace) was replaced with a tolerant parser.
Just upgrade to 4.3.x+ and that error should go away.