异常解决 Caused by: java.lang.NoSuchMethodError: kotlin.collections.ArraysKt.copyInto([B[BIII)[B

问题描述:引入 minio 8.3.5的包后,项目启动失败,异常信息如下

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    okio.Segment.writeTo(Segment.kt:169)

The following method did not exist:

    kotlin.collections.ArraysKt.copyInto([B[BIII)[B

The method's class, kotlin.collections.ArraysKt, is available from the following locations:

    jar:file:/org/jetbrains/kotlin/kotlin-stdlib/1.2.71/kotlin-stdlib-1.2.71.jar!/kotlin/collections/ArraysKt.class

It was loaded from the following location:

    file:/org/jetbrains/kotlin/kotlin-stdlib/1.2.71/kotlin-stdlib-1.2.71.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of kotlin.collections.ArraysKt

解决流程:

  1. 使用maven helper搜索pom文件里面的kotlin-stdlib包的依赖层级,发现项目包含两个kotlin-stdlib版本。
  2. 在低版本的引用包下,排除低版本的依赖,直接引入新版本的包解决
                </dependency>
			<exclusions>
				<exclusion>
					<groupId>org.jetbrains.kotlin</groupId>
					<artifactId>kotlin-stdlib</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.jetbrains.kotlin</groupId>
			<artifactId>kotlin-stdlib</artifactId>
			<version>1.3.72</version>
		</dependency>
posted @   哇哇咔哇咔咔  阅读(4696)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示