异常解决:java.lang.IllegalStateException: Failed to introspect Class
异常详情
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name xxxxx
Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [classA] from ClassLoader [sun.misc.Launcher$AppClassLoader@14dad5dc]
原因
此异常原因是因为classA中使用了项目没有导入的类,从而导致类加载失败。一般来说如果使用了没有依赖的类应该会报ClassNotFindException的错误,但是如果只是导入却没有使用的使用可能就会报此错误。
通常此错误见与使用maven框架配置了第三方类的scope是provided的情况下。笔者在使用spring boot、maven时导致此错误。
解决办法
检查classA类中可能存在的没有依赖的类或者包,将之导入(或者加入maven依赖、或调整依赖的包中的依赖的scope),总之使其类加载器能够在当期classPath找到此类即可。
原文地址:https://blog.csdn.net/huitoukest/article/details/88013763https://blog.csdn.net/huitoukest/article/details/88013763
异常解决:java.lang.IllegalStateException: Failed to introspect Class的更多相关文章
- springboot 启动报错 java.lang.IllegalStateException: Failed to introspect annotated methods on class org
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ...
- java.lang.IllegalStateException: Failed to load ApplicationContext selenium 异常 解决
WARN <init>, HHH000409: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF R ...
- Spring3.x 版本和 JDK1.8 不兼容导致 java.lang.IllegalStateException: Failed to load ApplicationContext
由于安装了 JDK1.8 的版本,最近在进行整合 Struts2+Spring+Hibernate 框架的时候,不小心导入了之前下载的 Spring 3.2.0 版本的 jar 包. 结果在运行测试用 ...
- junit测试时,出现java.lang.IllegalStateException: Failed to load ApplicationContext
课程设计要求进行junit测试,我是在已经做好的ssh项目上做的测试,测试类代码如下 package com.zhang.web.services; import static org.junit.A ...
- java.lang.IllegalStateException: Failed to load ApplicationContext
1.错误描述 七月 13, 2014 6:34:41 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBean ...
- 集成JUnit测试错误java.lang.IllegalStateException: Failed to load ApplicationContext
1 详细错误信息 java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.t ...
- maven单元测试报java.lang.IllegalStateException: Failed to load ApplicationContext
报这个异常java.lang.IllegalStateException: Failed to load ApplicationContext的时候,通常是因为applicationContent.x ...
- 解决java.lang.IllegalStateException: The application’s PagerAdapter changed the adapter’s content
A界面中有viewpager的动态加载,从界面A跳到界面B,再finish掉B返回A时报出此异常. java.lang.IllegalStateException: The application's ...
- Eclipse------使用Debug As时报错java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/XXX
报错信息: java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file ...
随机推荐
- Vue--findIndex方法的使用原理
原理: // 根据id得到下标 // 默认去遍历list集合,将集合中的每个元素传入到function的item里, var index = this.list.findIndex(function( ...
- 2017年2月27日Unicorn, US (148) and China (69), followed by the U.K. (10), India (9), Israel (5) and Germany (5).
Revisiting The Unicorn Club Get to know the newest crowd of billion dollar startups In 2013, when Ai ...
- 从0开始学习 GitHub 系列之「07.GitHub 常见的几种操作」
之前写了一个 GitHub 系列,反响很不错,突然发现竟然还落下点东西没写,前段时间 GitHub 也改版了,借此机会补充下. 我们都说开源社区最大的魅力是人人多可以参与进去,发挥众人的力量,让一个项 ...
- jquery判断页面网址是否有效
方法一:(jQuery方法: 适用所有浏览器) HTML页面: <!DOCTYPE html><html><head lang="en"> &l ...
- FileIntputStream / FileOutputStream 类
FileInputStream类(重点) (1)基本概念 java.io.FileInputStream类用于读取诸如图像之类的原始字节流. (2)常用的方法 FileInputStrea ...
- 【Vue】详解组件的基础与高级用法
Vue.js 最核心的功能就是组件(Component),从组件的构建.注册到组件间通信,Vue 2.x 提供了更多方式,让我们更灵活地使用组件来实现不同需求. 一.构建组件 1.1 组件基础 一个组 ...
- oracle误操作commit之后,可以闪回数据
1. 授予行迁移权限 alter table table_name enable row movement; 2. 到15分钟前: flashback table order to timesta ...
- 深入浅出Cocoa之类与对象【转】
最近打算写一些ObjC中比较底层的东西,尤其是 runtime 相关的.苹果已经将 ObjC runtime 代码开源了,我们可以从:http://opensource.apple.com/sourc ...
- 24种编程语言的Hello World程序
24种编程语言的Hello World程序 这篇文章主要介绍了 24 种编程语言的 Hello World 程序,包括熟知的 Java.C 语言.C++.C#.Ruby.Python.PHP 等编程语 ...
- 如何在iPhone 显示一个 星级评分
http://blog.csdn.net/fanjunxi1990/article/details/8663914 由于项目需求,需要做一个列表,里面有各个商品的评分,就是app store里面所有a ...