gpt4 book ai didi

java - 找不到内联方法的类 - 是什么原因导致的?

转载 作者:行者123 更新时间:2023-12-02 10:01:46 35 4
gpt4 key购买 nike

我收到以下堆栈跟踪错误:

java.lang.NoClassDefFoundError: com/github/jasync/sql/db/ConcreteConnectionBase$flatten$$inlined$mapTry$1
at com.github.jasync.sql.db.ConcreteConnectionBase.releaseIfNeeded(ConcreteConnectionBase.kt:98) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.mysql.MySQLConnection.sendPreparedStatementDirect(MySQLConnection.kt:299) [jasync-mysql-0.9.41.jar:?]
at com.github.jasync.sql.db.ConcreteConnectionBase$sendPreparedStatement$1.invoke(ConcreteConnectionBase.kt:75) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.ConcreteConnectionBase$sendPreparedStatement$1.invoke(ConcreteConnectionBase.kt:16) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.interceptor.ConnectionInterceptorHelperKt.wrapPreparedStatementWithInterceptors(ConnectionInterceptorHelper.kt:35) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.ConcreteConnectionBase.sendPreparedStatement(ConcreteConnectionBase.kt:67) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.pool.ConnectionFactory.test(ConnectionFactory.kt:81) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.pool.ConnectionFactory.test(ConnectionFactory.kt:14) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.pool.ObjectPoolActor.sendAvailableItemsToTest(ActorBasedObjectPool.kt:342) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.pool.ObjectPoolActor.handleTestAvailableItems(ActorBasedObjectPool.kt:282) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.pool.ObjectPoolActor.onReceive(ActorBasedObjectPool.kt:226) [jasync-common-0.9.41.jar:?]
at com.github.jasync.sql.db.pool.ActorBasedObjectPool$actor$1.invokeSuspend(ActorBasedObjectPool.kt:141) [jasync-common-0.9.41.jar:?]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32) [kotlin-stdlib-1.3.10.jar:1.3.10-release-253 (1.3.10)]
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?]
Caused by: java.lang.ClassNotFoundException: com.github.jasync.sql.db.ConcreteConnectionBase$flatten$$inlined$mapTry$1
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) [?:1.8.0_144]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [?:1.8.0_144]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) [?:1.8.0_144]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [?:1.8.0_144]
... 17 more

您可以在此处查看 ConcreteConnectionBase 类的源代码: https://github.com/jasync-sql/jasync-sql/blob/master/db-async-common/src/main/java/com/github/jasync/sql/db/ConcreteConnectionBase.kt

flatMapTrymapTry 是内联函数。奇怪的是,上面的堆栈跟踪不一致(即并非在所有实例上都发生)。

我反编译了 jar,但没有看到任何缺少类的证据(据我所知)。还有其他原因让我在这里失踪吗?

最佳答案

事实证明该 Artifact 已损坏。 gradle clean 修复了该问题。

我发现它的方法是使用:

>jar tf jasync-common-0.9.24.jar  | grep ConcreteConnectionBase | grep mapTry
com/github/jasync/sql/db/ConcreteConnectionBase$flatten$$inlined$mapTry$1$lambda$1.class
com/github/jasync/sql/db/ConcreteConnectionBase$flatten$$inlined$mapTry$1.class

并将其与以下内容进行比较:

>jar tf jasync-common-0.9.41.jar | grep ConcreteConnectionBase | grep ConcreteConnectionBase | grep ConcreteConnectionBase | grep ConcreteConnectionBase | grep ConcreteConnectionBase | grep map 尝试

里面是空的。

关于java - 找不到内联方法的类 - 是什么原因导致的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55568707/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com