Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeExcep

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException 


原来是spring版本的问题,MyBatis-Spring只能在spring3.0版本上使用,如果用spring3.0以下版本就会出现该问题,建议将spring升级为3.0或改用ibatis2.0!

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Caused by: java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain) at java.base/java.lang.Class.getMethod(Class.java:2227) at com.sun.xml.bind.v2.runtime.reflect.opt.Injector$3.run(Injector.java:201) at com.sun.xml.bind.v2.runtime.reflect.opt.Injector$3.run(Injector.java:197) at java.base/java.security.AccessController.doPrivileged(AccessController.java:569) ... 90 common frames omitted 2023-06-11 18:55:14.017 WARN 15576 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'resourceServerConfigurerAdapter': Unsatisfied dependency expressed through field 'pigAccessDeniedHandler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pigAccessDeniedHandler' defined in com.pig4cloud.pig.common.security.component.PigResourceServerAutoConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.pig4cloud.pig.common.security.component.PigAccessDeniedHandler]: Factory method 'pigAccessDeniedHandler' threw exception; nested exception is java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defineClass" is null
06-12
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值