Error creating bean with name

来源:4-12 引入kaptcha实现验证码

慕数据7471109

2018-05-20

Error creating bean with name 'sqlSessionFactory' defined in file。。。。我在写完验证码运行只有程序就突然炸了,之前都还能运行突然就暴毙了,我的area文件也在啊

//img.mukewang.com/szimg/5b0124c9000164e803610295.jpg

//img.mukewang.com/szimg/5b0124c900017d8113491217.jpg

下面贴上报错

Error creating bean with name 'sqlSessionFactory' defined in file [D:\tc8\wtpwebapps\o2o\WEB-INF\classes\spring\spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\tc8\wtpwebapps\o2o\WEB-INF\classes\mapper\AreaDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.o2o.pojo.Area'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.o2o.pojo.Area


写回答

1回答

翔仔

2018-05-20

同学好,从错误看 Cannot find class: com.o2o.pojo.Area,如果你确定这个类在的话,可以尝试clean并rebuild一下项目重新发布一下,出现的这个问题可能的原因是虽然你工程目录里面是有这个类,但是eclipse发布的时候没有探知到变更所以没有发布(发布文件的路径在console里一开始有打印)总之先试试clean

0
0

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程