web初始化出现的问题

来源:6-9 用户模块所有功能自测试

搁浅的珊瑚海

2018-03-04

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManageController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.hzq.service.IUserService com.hzq.controller.backend.UserManageController.iUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iUserService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.hzq.dao.UserMapper com.hzq.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [D:\idea\demo\target\demo\WEB-INF\classes\com\hzq\dao\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory

http://img.mukewang.com/szimg/5a9c0fda0001c84008280128.jpg


写回答

2回答

Geely

2018-03-10

ava.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory'

你好,同学,根本异常是因为这个,看看是否导错包?或者jar包没配置上?检查一下pom文件,和课程对比一下。

0
0

polo哦

2018-03-05

你好同学~根据错误主要是userMapper出错了~你可以看看有没有写错里面的一点东西,或者配置文件扫描mapper文件失败~

0
0

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程