首页 > web > tomcat

tomcat整合redis 因Jedis版本不一致遇到的异常
时间:2017-03-22 15:01:31  点击: 来源:  作者:

最近使用tomcat整合redis来保存session,启动tomcat时报错信息:




Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined ...

最近使用tomcat整合redis来保存session,启动tomcat时报错信息:




Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisTemplate' defined in class path resource [spring.xml]: Initialization of bean failed; nested exception is java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/springframework/data/redis/connection/jedis/JedisConnectionFactory.afterPropertiesSet()V @109: invokespecial
  Reason:
    Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[3]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'
  Current Frame:
    bci: @109
    flags: { }
    locals: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory' }
    stack: { 'org/springframework/data/redis/connection/jedis/JedisConnectionFactory', uninitialized 73, uninitialized 73, 'redis/clients/jedis/JedisPoolConfig', 'java/lang/String', integer, integer, 'java/lang/String' }
  Bytecode:
    0000000: 2ab4 000d c700 3d2a bb00 1759 2ab4 0003
    0000010: 2ab4 0004 b700 18b5 000d 2ab4 0019 b800
    0000020: 1a99 000e 2ab4 000d 2ab4 0019 b600 1b2a
    0000030: b400 059e 000e 2ab4 000d 2ab4 0005 b600
    0000040: 1c2a b400 0699 002e 2abb 001d 592a b400
    0000050: 0a2a b400 0db6 001e 2ab4 000d b600 1f2a
    0000060: b400 0db6 0020 2ab4 000d b600 21b7 0022
    0000070: b500 07b1                             
  Stackmap Table:
    same_frame(@47)
    same_frame(@65)...



原因:jedis版本不一致导致。

解决方法:更换tomcat/lib目录下jedis版本和项目目录下的jedis版本。

附件,常用版本下载:http://mirror.cnop.net/jedis/

”您可通过以下微信二维码,赞赏作者“
 
 
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
推荐资讯
linux服务器同步互联网时间
linux服务器同步互联
亚马逊云lightsail服务器使用教程 | 亚马逊云lightsail使用指南
亚马逊云lightsail服
hostdare 4折优惠,直接降价60% 美国洛杉矶低至 $10.4/年 768M内存/1核/10gNVMe/500g流量
hostdare 4折优惠,直接
六类网线cat6a和cat6e的区别
六类网线cat6a和cat6e
相关文章
栏目更新
栏目热门

关于我们 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | WAP | RSS


Copyright © 运维之家 2013-2023