Caused by: com.alibaba.fastjson.JSONException: create asm serializer error, verson 1.2.49, class class com.cmwa.scbp.utils.cached.entity.UserInfoVo at com.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:242) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:102) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:713) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:414) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.JSONSerializer.getObjectWriter(JSONSerializer.java:377) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:278) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.JSON.toJSONString(JSON.java:591) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.JSON.toJSONString(JSON.java:580) ~[fastjson-1.2.49.jar:?] at com.cmwa.scbp.utils.cached.redis.FastJsonRedisSerializer.serialize(FastJsonRedisSerializer.java:24) ~[scbp-api-cache-0.0.1-SNAPSHOT.jar:?] at org.springframework.data.redis.core.AbstractOperations.rawValue(AbstractOperations.java:126) ~[spring-data-redis-2.0.8.RELEASE.jar:2.0.8.RELEASE] at org.springframework.data.redis.core.AbstractOperations.rawValues(AbstractOperations.java:153) ~[spring-data-redis-2.0.8.RELEASE.jar:2.0.8.RELEASE] at org.springframework.data.redis.core.DefaultListOperations.leftPushAll(DefaultListOperations.java:122) ~[spring-data-redis-2.0.8.RELEASE.jar:2.0.8.RELEASE] at com.cmwa.scbp.utils.cached.EmployeeCacheLoader.loadMappingCached(EmployeeCacheLoader.java:41) ~[classes/:?] at com.cmwa.scbp.utils.cached.EmployeeCacheLoader.afterPropertiesSet(EmployeeCacheLoader.java:31) ~[classes/:?] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$132/2098136980.getObject(Unknown Source) ~[?:?] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:513) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:484) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:618) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:177) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1350) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:580) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$132/2098136980.getObject(Unknown Source) ~[?:?] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:513) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:484) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:618) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:177) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] ... 23 more Caused by: java.lang.VerifyError: (class: com/alibaba/fastjson/serializer/ASMSerializer_3_UserInfoVo, method: writeAsArray signature: (Lcom/alibaba/fastjson/serializer/JSONSerializer;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/reflect/Type;I)V) Incompatible object argument for function call at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_40] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[?:1.8.0_40] at java.lang.Class.getConstructor0(Class.java:3075) ~[?:1.8.0_40] at java.lang.Class.getConstructor(Class.java:1825) ~[?:1.8.0_40] at com.alibaba.fastjson.serializer.ASMSerializerFactory.createJavaBeanSerializer(ASMSerializerFactory.java:413) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.SerializeConfig.createASMSerializer(SerializeConfig.java:80) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:226) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.SerializeConfig.createJavaBeanSerializer(SerializeConfig.java:102) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:713) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.SerializeConfig.getObjectWriter(SerializeConfig.java:414) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.JSONSerializer.getObjectWriter(JSONSerializer.java:377) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:278) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.JSON.toJSONString(JSON.java:591) ~[fastjson-1.2.49.jar:?] at com.alibaba.fastjson.JSON.toJSONString(JSON.java:580) ~[fastjson-1.2.49.jar:?] at com.cmwa.scbp.utils.cached.redis.FastJsonRedisSerializer.serialize(FastJsonRedisSerializer.java:24) ~[scbp-api-cache-0.0.1-SNAPSHOT.jar:?] at org.springframework.data.redis.core.AbstractOperations.rawValue(AbstractOperations.java:126) ~[spring-data-redis-2.0.8.RELEASE.jar:2.0.8.RELEASE] at org.springframework.data.redis.core.AbstractOperations.rawValues(AbstractOperations.java:153) ~[spring-data-redis-2.0.8.RELEASE.jar:2.0.8.RELEASE] at org.springframework.data.redis.core.DefaultListOperations.leftPushAll(DefaultListOperations.java:122) ~[spring-data-redis-2.0.8.RELEASE.jar:2.0.8.RELEASE] at com.cmwa.scbp.utils.cached.EmployeeCacheLoader.loadMappingCached(EmployeeCacheLoader.java:41) ~[classes/:?] at com.cmwa.scbp.utils.cached.EmployeeCacheLoader.afterPropertiesSet(EmployeeCacheLoader.java:31) ~[classes/:?] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$132/2098136980.getObject(Unknown Source) ~[?:?] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:513) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:484) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:618) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:177) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1350) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:580) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$132/2098136980.getObject(Unknown Source) ~[?:?] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:513) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:484) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:618) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:177) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE] ... 23 more
继承一个BaseVo后就会报错,不继承不报错
1条答案
按热度按时间62o28rlo1#
多个fastjson版本共存了?