`

SpringBoot项目打包成jar后启动出现ClassNotFoundException异常

 
阅读更多

1、使用IntelliJ IDEA 开发,开发环境运行正常;

2、使用maven打包成jar包,成功打包;

3、运行项目的jar包,无法正常启动,出现ClassNotFoundException异常,找不到某些实体类;

详细错误日志:

2020-01-14 16:04:53.142 ERROR 10700 --- [main] o.s.boot.SpringApplication               : Application run failed

 

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'methodValidationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'methodValidationPostProcessor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilterFactoryBean' defined in class path resource [com/xxxx/manage/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'shiroFilterFactoryBean' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/xxxx/manage/config/ShiroConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.mgt.SecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroRealm': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in URL [jar:file:/D:/DbomSys/target/DBOMSys-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/xxxx/manage/dao/SysUserMapper.class]: Cannot resolve reference to bean 'pojoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pojoSqlSessionTemplate' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Unsatisfied dependency expressed through method 'pojoSqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbSqlSessionFactory' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:228) ~[spring-context-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:721) ~[spring-context-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:534) ~[spring-context-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]

at com.xxxx.manage.DbomSysApplication.main(DbomSysApplication.java:23) [classes!/:0.0.1-SNAPSHOT]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_92]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_92]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_92]

at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_92]

at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [DBOMSys-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [DBOMSys-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [DBOMSys-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [DBOMSys-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilterFactoryBean' defined in class path resource [com/xxxx/manage/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'shiroFilterFactoryBean' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/xxxx/manage/config/ShiroConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.mgt.SecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroRealm': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in URL [jar:file:/D:/DbomSys/target/DBOMSys-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/xxxx/manage/dao/SysUserMapper.class]: Cannot resolve reference to bean 'pojoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pojoSqlSessionTemplate' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Unsatisfied dependency expressed through method 'pojoSqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbSqlSessionFactory' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck(AbstractAutowireCapableBeanFactory.java:991) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:865) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:574) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:514) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:477) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:227) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1411) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1210) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 27 common frames omitted

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [com/xxxx/manage/config/ShiroConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.mgt.SecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroRealm': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in URL [jar:file:/D:/DbomSys/target/DBOMSys-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/xxxx/manage/dao/SysUserMapper.class]: Cannot resolve reference to bean 'pojoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pojoSqlSessionTemplate' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Unsatisfied dependency expressed through method 'pojoSqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbSqlSessionFactory' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 41 common frames omitted

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.mgt.SecurityManager]: Factory method 'securityManager' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroRealm': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in URL [jar:file:/D:/DbomSys/target/DBOMSys-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/xxxx/manage/dao/SysUserMapper.class]: Cannot resolve reference to bean 'pojoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pojoSqlSessionTemplate' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Unsatisfied dependency expressed through method 'pojoSqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbSqlSessionFactory' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 55 common frames omitted

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroRealm': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in URL [jar:file:/D:/DbomSys/target/DBOMSys-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/xxxx/manage/dao/SysUserMapper.class]: Cannot resolve reference to bean 'pojoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pojoSqlSessionTemplate' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Unsatisfied dependency expressed through method 'pojoSqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbSqlSessionFactory' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference(ConfigurationClassEnhancer.java:394) ~[spring-context-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:366) ~[spring-context-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at com.xxxx.manage.config.ShiroConfig$$EnhancerBySpringCGLIB$$64aeade1.shiroRealm(<generated>) ~[classes!/:0.0.1-SNAPSHOT]

at com.xxxx.manage.config.ShiroConfig.securityManager(ShiroConfig.java:112) ~[classes!/:0.0.1-SNAPSHOT]

at com.xxxx.manage.config.ShiroConfig$$EnhancerBySpringCGLIB$$64aeade1.CGLIB$securityManager$0(<generated>) ~[classes!/:0.0.1-SNAPSHOT]

at com.xxxx.manage.config.ShiroConfig$$EnhancerBySpringCGLIB$$64aeade1$$FastClassBySpringCGLIB$$1f9607ec.invoke(<generated>) ~[classes!/:0.0.1-SNAPSHOT]

at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at com.xxxx.manage.config.ShiroConfig$$EnhancerBySpringCGLIB$$64aeade1.securityManager(<generated>) ~[classes!/:0.0.1-SNAPSHOT]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_92]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_92]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_92]

at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_92]

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 56 common frames omitted

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserMapper' defined in URL [jar:file:/D:/DbomSys/target/DBOMSys-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/com/xxxx/manage/dao/SysUserMapper.class]: Cannot resolve reference to bean 'pojoSqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pojoSqlSessionTemplate' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Unsatisfied dependency expressed through method 'pojoSqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbSqlSessionFactory' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:378) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1681) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1433) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 79 common frames omitted

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pojoSqlSessionTemplate' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Unsatisfied dependency expressed through method 'pojoSqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbSqlSessionFactory' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:367) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 92 common frames omitted

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbSqlSessionFactory' defined in class path resource [com/xxxx/manage/config/DataSourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:607) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 102 common frames omitted

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'dbSqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 116 common frames omitted

Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/xxxx/manage/mapper/SysUserRoleMapper.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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:523) ~[mybatis-spring-1.3.1.jar!/:1.3.1]

at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:380) ~[mybatis-spring-1.3.1.jar!/:1.3.1]

at org.mybatis.spring.SqlSessionFactoryBean.getObject(SqlSessionFactoryBean.java:547) ~[mybatis-spring-1.3.1.jar!/:1.3.1]

at com.xxxx.manage.config.DataSourceConfig.dbSqlSessionFactory(DataSourceConfig.java:49) ~[classes!/:0.0.1-SNAPSHOT]

at com.xxxx.manage.config.DataSourceConfig$$EnhancerBySpringCGLIB$$fbe62e9f.CGLIB$dbSqlSessionFactory$1(<generated>) ~[classes!/:0.0.1-SNAPSHOT]

at com.xxxx.manage.config.DataSourceConfig$$EnhancerBySpringCGLIB$$fbe62e9f$$FastClassBySpringCGLIB$$b0c33b2a.invoke(<generated>) ~[classes!/:0.0.1-SNAPSHOT]

at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

at com.xxxx.manage.config.DataSourceConfig$$EnhancerBySpringCGLIB$$fbe62e9f.dbSqlSessionFactory(<generated>) ~[classes!/:0.0.1-SNAPSHOT]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_92]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_92]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_92]

at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_92]

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.6.RELEASE.jar!/:5.1.6.RELEASE]

... 117 common frames omitted

Caused by: 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 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:120) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:521) ~[mybatis-spring-1.3.1.jar!/:1.3.1]

... 130 common frames omitted

Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:118) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:74) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:135) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:128) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:118) ~[mybatis-3.4.5.jar!/:3.4.5]

... 132 common frames omitted

Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'SysUserRoleKey'.  Cause: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:120) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116) ~[mybatis-3.4.5.jar!/:3.4.5]

... 136 common frames omitted

Caused by: java.lang.ClassNotFoundException: Cannot find class: SysUserRoleKey

at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:200) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.io.Resources.classForName(Resources.java:261) ~[mybatis-3.4.5.jar!/:3.4.5]

at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:116) ~[mybatis-3.4.5.jar!/:3.4.5]

... 138 common frames omitted

 

 

经追踪原因,是在mapper.xml文件中使用了某个实体类,比如SysUserRoleKey,比如在resultType 和parameterType的值是使用了实体类,但没有写出实体类的完整路径,造成打包成jar包时找不到对应的类。

错误的写法:

<select id="findByUserId" resultType="SysUserRoleKey">
  SELECT
  user_id,role_id
  FROM sys_user_role WHERE user_id=#{userId}
</select>

正确的写法:

<select id="findByUserId" resultType="com.xxxx.manage.pojo.SysUserRoleKey">
  SELECT
  user_id,role_id
  FROM sys_user_role WHERE user_id=#{userId}
</select>

 

的确很坑。

 

分享到:
评论

相关推荐

    动态加载jar包

    6. **错误处理**:在整个过程中,需要注意捕获和处理可能出现的异常,如`ClassNotFoundException`、`IOException`和`IllegalAccessException`等。 在实际应用中,动态加载jar包的实现可能更为复杂,例如,可能需要...

    JSP中ClassNotFoundException异常的解决办法.pdf

    在Java服务器页面(JSP)开发中,可能会遇到`ClassNotFoundException`异常,这通常是由于系统无法找到或加载指定的类导致的。此异常通常与类路径配置、库引用或JDBC驱动有关。以下是一些解决此类问题的有效方法: ...

    java.lang.ClassNotFoundException异常的解决1

    Java中的`ClassNotFoundException`异常通常表示在尝试加载特定类时,JVM无法找到对应的字节码文件。这个异常可能由多种原因引起,但在本场景中,它与Java 9引入的模块系统及其对Java EE API的影响密切相关。 在Java...

    java项目打包成exe格式

    - 包含所有依赖的JAR文件,以防运行时出现“ClassNotFoundException”。 - 配置正确的主类,这是程序启动的入口。 - 如果选择内置JRE,注意文件大小可能会增加,因为需要包含JRE的一部分。 - 考虑到版权问题,...

    AndroidStudio项目打包成jar的简单方法

    在Android开发环境中,有时我们需要将一个模块或库打包成JAR文件,以便在其他项目中复用。在Eclipse中,这个过程相对直观,但在Android Studio中,我们需要借助Gradle构建系统来完成。以下是Android Studio项目打包...

    使用IDEA启动项目遇见ClassNotFoundException的解决方案

    使用IDEA启动项目遇见ClassNotFoundException的解决方案 在使用IDEA启动项目时,可能会遇见ClassNotFoundException的错误,导致项目无法启动。本文将详细介绍使用IDEA启动项目遇见ClassNotFoundException的正确解决...

    springboot动态加载jar包到容器中,并映射为接口

    ### Spring Boot 动态加载 Jar 包到容器中并映射为接口的技术解析 #### 一、背景介绍 在实际的开发过程中,我们经常会遇到这样的需求:系统需要根据不同的业务场景来动态地加载不同的功能模块或者组件。这些功能...

    java 找不到指定类时发生的异常(ClassNotFoundException)

    在Java编程语言中,`ClassNotFoundException`是一个非常常见的运行时异常,它属于`java.lang.ClassNotFoundException`,当Java虚拟机(JVM)试图动态加载一个类并无法找到对应的.class文件时,就会抛出这个异常。...

    Struts的java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource异常的解决方法

    3. **重启应用**:完成上述更改后,重新启动应用服务器,看是否还存在异常。 4. **调试和日志**:如果问题仍然存在,可以开启应用服务器的详细日志,查看是否有更具体的错误信息,以便进行更深入的调试。 总的来说...

    调用百度定位SDK,出现ClassNotFoundException

    出现ClassNotFoundException异常时,这可能意味着在其他人的电脑上缺少了对百度定位SDK的正确引用。以下是一些可能导致该问题的原因: 1. **Gradle依赖未添加**:在Android Studio项目中,我们需要在build.gradle...

    ClassNotFoundException终极解决办法

    `ClassNotFoundException` 是 Java 开发过程中常见的运行时异常,通常发生在尝试加载某个类时,系统无法在指定的类路径(ClassPath)中找到对应的 `.class` 文件。本文将深入探讨 `ClassNotFoundException` 的原因、...

    java连接sqlserver数据库示例以及jar包

    5. **异常处理**:在上述示例中,我们使用了`try-catch`语句来捕获可能的异常,确保在出现错误时能够适当地处理并打印堆栈跟踪信息。 总的来说,通过理解和实践这个示例,开发者可以掌握Java连接SQL Server数据库的...

    本地jar包打包到本地仓库 ROOT.war

    (3)将ROOT.war包放在tomcat 8.0 及以上tomcat的 tomcat-8.0.*\webapps\ 目录下(若存在ROOT文件夹,可先在其他地方[不能在webapps]进行备份后删去); (4)运行,双击 tomcat-8.0.*\bin\startup.bat 启动; (5...

    excel表格需要的所有的jar包

    在操作excel表格时,因为存在Excel2003和Excel2007两种版本的excel表格,所有如果jar包引入不够,...引入此包后,可能还会有个异常,原因是找不到dom4j的jar包。 因为poi-ooxml-schemas-xx.jar需要依赖dom4j-xxx.jar包

    fatjar 打包插件与快速查找eclipse插件

    `fatjar`通过包含所有依赖,避免了运行时出现"ClassNotFoundException"或其他由于缺少类路径而导致的问题,简化了部署流程。 `fatjar`插件主要工作原理是扫描项目中的所有类和资源,包括外部库,然后使用Java的`jar...

    Spring Boot详细打印启动时异常堆栈信息详析

    在Spring Boot应用开发中,有时候在项目启动时可能会遇到各种异常情况。然而,Spring Boot默认情况下只会打印出简略的错误消息,这对于开发者来说可能不足以定位问题所在。为了解决这个问题,Spring Boot引入了`...

    在可执行jar中载入第三方jar的几个解决方法

    在Java开发中,将项目打包成可执行JAR(Java Archive)文件是常见的发布方式,尤其是在需要集成第三方库的情况下。然而,当从可执行JAR加载第三方JAR中的类时,常常会遇到“ClassNotFoundException”。这个问题通常...

    SSH项目部署在window和linux下的Weblogic上出现 ClassNotFound异常解决办法

    本文针对一个具体的案例进行分析——SSH项目部署在Window和Linux环境下的WebLogic服务器上出现的`ClassNotFoundException`异常,并提供了解决方案。 #### 问题描述 当部署SSH项目到WebLogic服务器时,遇到了`...

    java.lang.ClassNotFoundException: net.sf.ezmorph.MorpherRegistry

    在Java编程中,`ClassNotFoundException` 是一个常见的运行时异常,通常发生在尝试加载特定类时,JVM无法找到对应类的定义。在这个特定的情景中,错误提示 "java.lang.ClassNotFoundException: ...

Global site tag (gtag.js) - Google Analytics