异常:java.lang.NoClassDefFoundError

记一次启动异常排查心路历程

合并代码之后想尝试启动看是否有异常,然后直接报错

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: co/yixiang/modules/userInfo/service/dto/UserAssetManageVo (wrong name: co/yixiang/modules/userinfo/service/dto/UserAssetManageVo)

主体大概意思就是在做实例化的过程中发生了嵌套异常了,并把具体嵌套异常的类地址报出来了

就像尾句是这样的:java.lang.NoClassDefFoundError: co/xxx/xxx/xxx/xxx/xxx/类名

那怎么处理呢,我百度大部分都是告诉你通过maven重新clear,install一下或者清除maven库重新去做下载,然而一顿操作并没有什么用

最后排查了很久,通过应用该类的地方一步步找到mapper层,在xml里面找到了原因

其他开发在修改类路径时,没有修改到mapper的xml,导致其中运行时没有加载到该类报错

我真的是!!!!!!!!淦

最后修改xml文件的类路径成功启动

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值