Ouyangan / hunt-admin

java后台管理系统,spring,springmvc,mybatis,shiro,swagger 实现用户,角色,权限,日志,数据库监控,用户在线状态控制
Apache License 2.0
335 stars 163 forks source link

部署到Jetty上之后运行报错 #3

Closed gymiicmc closed 6 years ago

gymiicmc commented 6 years ago

老哥你还在吗?请教一下运行报错的原因,日志如下。。。。。。。。

七月 16, 2018 4:05:13 下午 com.alibaba.druid.pool.DruidDataSource info 信息: {dataSource-1} closed 七月 16, 2018 4:05:13 下午 org.springframework.web.context.ContextLoader initWebApplicationContext 严重: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring/spring-shiro.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0' defined in class path resource [spring/spring-shiro.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/spring-shiro.xml]: Cannot resolve reference to bean 'shiroRealm' while setting bean property 'realms' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroRealm': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sample.dao.SysUserPermissionMapper com.sample.system.security.shiro.ShiroRealm.sysUserPermissionMapper; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserPermissionMapper' defined in URL [jar:file:/E:/RCU/sampleTest/sample-ms/sample-web/target/sample-web-1.0-SNAPSHOT/WEB-INF/lib/sample-dao-1.0-SNAPSHOT.jar!/com/sample/dao/SysUserPermissionMapper.class]: Cannot resolve reference to bean 'mybatisSqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mybatisSqlSessionFactory' defined in class path resource [spring/spring-mybatis.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [spring/mybatis.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.ClassCastException: com.github.pagehelper.PageHelper cannot be cast to org.apache.ibatis.plugin.Interceptor Related cause: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'shiroFilter': Requested bean is currently in creation: Is there an unresolvable circular reference?

Ouyangan commented 6 years ago

org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.ClassCastException: com.github.pagehelper.PageHelper cannot be cast to org.apache.ibatis.plugin.Interceptor

mybatis初始化失败了,检查下你的mybatis相关依赖版本