Skip to content
← Back to activity

Public problem

java.lang.NoSuchMethodError: kotlin.collections.ArraysKt.copyInto with the Harness Java SDK in Spring Boot

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Initializing the Harness Java SDK CfClient in a Spring Boot project throws java.lang.NoSuchMethodError: kotlin.collections.ArraysKt.copyInto from okio. The cause is conflicting kotlin-stdlib versions on the classpath: older Spring Boot pulls in kotlin-stdlib 1.2.x, which clashes with what okhttp 4.9.x needs.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Upgrade Spring Boot to 2.7.x if you can, which brings a compatible kotlin-stdlib. If not, force a newer kotlin-stdlib by adding it directly to your dependencies. This is a classpath conflict, not a bug in the SDK.

Source: https://github.com/harness/ff-java-server-sdk/issues/131

Source: https://github.com/harness/ff-java-server-sdk/issues/131