Maven项目中缺少jar包引起的报错 nested exception is java.lang.NoClassDefFoundError
来源:互联网 发布:淘宝怎么查看我的评价 编辑:程序博客网 时间:2024/05/16 18:36
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.mybatis.caches.ehcache.EhcacheCache
【原因解决:】发生在Maven项目中,EhcacheCache是其中pom中引入的一个jar包,但是由于网络问题,这个jar包下载完成,但是相应的pom文件并没有下载完成,导致不能正常初始化而报错。删除repository中对应的路径,将文件夹下的文件全部删除,在pom的dependency中剪切这组标签,重新粘贴,保存。网络好的情况下自动下载完整jar包和相应pom配置文件。再运行项目,一切正常。
阅读全文
0 0
- Maven项目中缺少jar包引起的报错 nested exception is java.lang.NoClassDefFoundError
- nested exception is java.lang.NoClassDefFoundError
- maven管理的jar包,项目中引用不到,报错java.lang.ClassNotFoundException
- 【项目异常】nested exception is java.lang.NoClassDefFoundError: org/aspectj/util
- nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
- nested exception is java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException
- nested exception is java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
- Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
- nested exception is java.lang.NoClassDefFoundError: com/alibaba/fastjson/JSON
- nested exception is java.lang.NoClassDefFoundError: com/google/gson/Gson
- nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/Type
- nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/Type
- nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
- 使用json时报错:nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
- 引入jar包但是报错java.lang.NoClassDefFoundError
- 解决Tomcat启动多个web项目报错nested exception is java.lang.OutOfMemoryError: PermGen space
- nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
- 使用maven加载项目中缺少的jar包
- Redis与mysql同步之路
- HTML5 跨平台app调试api接口方案
- Rxjava2(二)
- 实例:把一个/oldboy目录及其子目录所有的扩展名.sh结尾的文件中包含oldboy的字符全部替换为beautiful
- Python队列同步
- Maven项目中缺少jar包引起的报错 nested exception is java.lang.NoClassDefFoundError
- 【Emgucv】图像卷积(TEST)
- solr-4.10.3的IK Analyzer分词器配置
- Linux 在终端中打开新的终端:gnome-terminal
- android Studio运行时,出现java.lang.NoClassDefFoundError
- PAT 1016. 部分A+B (15)
- LinuxC语言概述及开发工具的使用
- 俯视膜拜初等数论
- 1.4 对齐输出