No exception of type BeansException can be thrown; an exception type must be a sunclass of Throwable
来源:互联网 发布:序列比对软件 编辑:程序博客网 时间:2024/06/06 03:38
今天复习spring的时候出现了该错误
字面意思是BeansException不是一个异常类,不能抛出,只有Throwable的子类才算是异常。
上网找了些资料,都是一个文章被转来转去,大概解释就是缺少jar包或者用错了jar包的版本。
然后我检查了一下,项目里的jar包是齐全的并且版本没问题,
然后我就猜测:可能项目里的spring-beans-4.3.9RELEASE.jar包里的BeansException类确实没有继承Throwable类,这就说明,spring-beans-4.3.9RELEASE.jar包虽然存在,但是这个包是错误的或者不完整的。
包不完整的原因是包的来源有问题,我的jar包来源是:eclipse集成maven,在配置好pom.xml里的依赖后,对需要的jar包进行下载。
众所周知,eclipse下载很慢,很有可能是eclipse的下载出了问题。
于是我关闭eclipse,进入maven仓库删除了org/springframework目录,然后命令提示符进入项目路径执行mvn clean compile,利用命令提示符下载jar包,下载完毕之后再打开eclipse,大功告成,问题解决。
阅读全文
0 0
- No exception of type BeansException can be thrown; an exception type must be a sunclass of Throwable
- No exception of type JmsException can be thrown; an exception type must be a subclass of Throwable
- java-No exception of type ConfigurationException can be thrown; an exception type must be a subclass
- No exception of type HibernateException can be thrown; an exception type must be a subclass of Thro
- The type OneInterface cannot be a superinterface of OneInterfaceImpl; a superinterface must be an in
- Exception of type System.OutOfMemoryException was thrown.
- Exception of type 'System.OutOfMemoryException' was thrown
- An unhandled exception of type 'System.StackOverflowException'
- 处理Exception of type System.OutOfMemoryException was thrown
- spring exception--No unique bean of type
- The type of the expression must be an array type but it resolved to Point
- TypeError: super(type, obj): obj must be an instance or subtype of type
- The DefaultButton of must be the ID of a control of type IButtonControl
- The DefaultButton of must be the ID of a control of type IButtonControl
- VS2010:error C3083: 'Windows': the symbol to the left of a '::' must be a type
- VS2010:error C3083: 'Office': the symbol to the left of a '::' must be a type
- An unhandled exception of type "System.InvalidCastException" occurred
- 'hibernateTemplate' must be of type [org.springframework.orm.hibernate5.HibernateTemplate]
- LeetCode 199 Binary Tree Right Side View(二叉树层序遍历)
- vs 2017 找不到stdio.h 文件问题
- 利用nodejs的简单web聊天
- php虚拟主机配置
- CNN学习(二)
- No exception of type BeansException can be thrown; an exception type must be a sunclass of Throwable
- web测试方法总结
- Python-OpenCV基本操作
- Ehlib组件DBGridEh自动排序之正常运行
- 51nod
- 基于Bootstrap与jQuery-Validate的个人简易封装
- 从vi命令开始
- linux nice与renice进程优先级调度命令学习与示例
- python面向对象编程