Failed to introspect Class from LaunchedURLClassLoader

Posted alf_cee

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Failed to introspect Class from LaunchedURLClassLoader相关的知识,希望对你有一定的参考价值。

今天调试一个springboot应用程序,本地运行正常,部署到服务器上,报错。

nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxxxxManagerImpl': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [xxx.xxx.xxxxxxManagerImpl] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@b1bc7ed]
 

根据这个帖子 https://blog.csdn.net/huitoukest/article/details/88013763 提供的思路,知道是xxxxxxManagerImpl类中import 中的类的jar包没有打包到 springboot 的 jar 中。

我这里是这个类引起的:org.springframework.mock.web.MockMultipartFile。它在spring-test包中,测试包肯定不会发布到运行jar包中的。

改完后有时还是报上面的错误。查看日志发现有stackoverflow异常。 调大java 栈的 -Xss512k,问题等到解决。

以上是关于Failed to introspect Class from LaunchedURLClassLoader的主要内容,如果未能解决你的问题,请参考以下文章

Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.mchange.v2.c3p0.ComboPoo

无法在 debian 拉伸上构建 gobject--introspection-1.70.0

安装Intel HAXM:"failed to configure driver unknown error. failed to open driver"

failed to load resource怎么解决?

maven打包出错: Failed to clean project: Failed to delete

GlideException: Failed to load resource……java.net.SocketTimeoutException(failed to connect to xxx)