Hi, We are trying to make the move from tags to en...
# pact-jvm
p
Hi, We are trying to make the move from tags to environments and deployments to overcome many problems we are having our workflow. Early work in JS looks promising. However we have hit a snag in Java when trying to upgrade the version from 4.3.9 to the new 4.3.11 (or indeed 4.3.10). Running JUnit5 with maven. We get the error during runtime of [ERROR] pactVerificationTestTemplate{PactVerificationContext, HttpRequest} Time elapsed: 6.217 s <<< ERROR! java.lang.RuntimeException: java.lang.NoSuchMethodError: 'void kotlin.jvm.internal.FunctionReferenceImpl.<init>(int, java.lang.Class, java.lang.String, java.lang.String, int)' Caused by: java.lang.NoSuchMethodError: 'void kotlin.jvm.internal.FunctionReferenceImpl.<init>(int, java.lang.Class, java.lang.String, java.lang.String, int)' The tests run fine against
Copy code
<dependency>
  <groupId>au.com.dius.pact.provider</groupId>
  <artifactId>junit5</artifactId>
  <version>4.3.9</version>
</dependency>
but give that error in 4.3.11. Appreciate any help in this. Many thanks
r
That looks like a conflict with Kotlin standard library versions. I'm just going through the change log to see what has changed since 4.3.9
Can you check the dependency tree of your project? Pact-JVM is compiled against Kotlin stdlib 1.5.31
p
@rholshausen Thank you for your suggestion - and apologies for your response (we had delays in accessing our dev broker version). We have added in
Copy code
<dependency>
  <groupId>org.jetbrains.kotlin</groupId>
  <artifactId>kotlin-stdlib-common</artifactId>
  <version>1.5.31</version>
</dependency>
to our pom.xml - but are still seeing the same runtime error: [ERROR] pactVerificationTestTemplate{PactVerificationContext, HttpRequest} Time elapsed: 3.168 s <<< ERROR! java.lang.RuntimeException: java.lang.NoSuchMethodError: 'void kotlin.jvm.internal.FunctionReferenceImpl.<init>(int, java.lang.Class, java.lang.String, java.lang.String, int)' Caused by: java.lang.NoSuchMethodError: 'void kotlin.jvm.internal.FunctionReferenceImpl.<init>(int, java.lang.Class, java.lang.String, java.lang.String, int)' with version 4.3.10/11
Copy code
<groupId>au.com.dius.pact.provider</groupId>
<artifactId>junit5</artifactId>
. Any further suggestions. Many thanks
Any further suggestions please - we want to move towards deployments rather than releases. But this is stopping the Java provider examples. Thanks
u
I got this error as well. Looks like a bug with the Kotlin compiler. I changed the function signature that was causing the issue, and the exception went away. I'll release a fix for this soon.
👍 2
p
@uglyog Thanks. If possible can you please post here when that is available.
m
p
@Matt (pactflow.io / pact-js / pact-go) Yes, thanks. Just tried that and it works now 🥳 Need to work through your guides now, and start to deploy around services, so we can start moving away from tags. Many thanks
🙌 1