讨论区 » AAS-V10企业版 »
应用发布报jedis和spring...RedisConnectionFactory和VerifyError: Bad return type 冲突的问题
由 黄 俊睿 在 大约 3 年 之前添加
异常信息:
出现异常错误:部署期间出错: : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'zyCodeNameGenerator' defined in file [/usr/local/project/dgzsdm/WEB-INF/classes/cn/kiway/jyjh/common/utils/CodeNameGenerator.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisUtil' defined in file [/usr/local/project/dgzsdm/WEB-INF/classes/cn/kiway/jyjh/common/utils/RedisUtil.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisTemplate' defined in cn.kiway.jyjh.common.configuration.CachingConfiguration: Unsatisfied dependency expressed through method 'redisTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in cn.kiway.jyjh.common.configuration.CachingConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.RedisConnectionFactory]: Factory method 'redisConnectionFactory' threw exception; nested exception is java.lang.VerifyError: Bad return type
Exception Details:
Location:
org/springframework/data/redis/connection/jedis/JedisConnectionFactory.createRedisSentinelPool(Lorg/springframework/data/redis/connection/RedisSentinelConfiguration;)Lredis/clients/util/Pool; @68: areturn
Reason:
Type 'redis/clients/jedis/JedisSentinelPool' (current frame, stack[0]) is not assignable to 'redis/clients/util/Pool' (from method signature)
Current Frame:
bci: @68
flags: { }
locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory',
版本号:202106101338
解决时间:2021-8-19
解决方案:
在应用的WEB-INF中放入附件中的apusic-web.xml文件,并重新发布应用,具体内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<aas-web-app>
<class-loader delegate="true" prefer-app-pkg="redis.clients"/>
</aas-web-app>
界面现象:
日志截图:
解决操作:
apusic-web.xml (139 Bytes) apusic-web.xml |