# pact-jvm

Anh Vuong

09/22/2022, 6:22 PM
I have almost same contract tests - same class name, imports, provider, consumer names etc - and "mvn test" works in one simpler repo and fails on a bigger repo with errors below. I have compared pom.xml for libraries's versions, jdk 17 etc. I run out of clues. Hope some one ahs seen the errors. java.lang.IncompatibleClassChangeError: Expected static method 'java.lang.Object,' at at$1.evaluate( at org.junit.rules.RunRules.evaluate( at org.junit.runners.ParentRunner.runLeaf( at org.junit.runners.BlockJUnit4ClassRunner.runChild( at org.junit.runners.BlockJUnit4ClassRunner.runChild( at org.junit.runners.ParentRunner$ at org.junit.runners.ParentRunner$1.schedule( at org.junit.runners.ParentRunner.runChildren( at org.junit.runners.ParentRunner.access$000( at org.junit.runners.ParentRunner$2.evaluate( at at at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs( at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute( at com.intellij.rt.execution.junit.TestsRepeater.repeat( at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs( at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart( at com.intellij.rt.junit.JUnitStarter.main( Process finished with exit code 255 import; import; import; import; import; import; import; import; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import; import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.Map; public class ApStateConsumerMessagePactTest { @Rule public MessagePactProviderRule mockProvider = new MessagePactProviderRule("producer-message", this); ... }


09/26/2022, 1:19 AM
This means you have a mismatch in the versions of the Pact-JVM libraries. You need to make sure all the Pact-JVM libraries you use have the same major and minor versions.