jedis:exception is java.lang.VerifyError: Bad type on operand stack
项目中需要用到缓存,经过比较后,选择了redis,客户端使用jedis连接,也使用到了spring提供的spring-data-redis。配置正确后启动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) same_frame(@115) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:442) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:416) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:550) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303) ... 39 more Caused by: 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) same_frame(@115) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2493) at java.lang.Class.getDeclaredConstructors(Class.java:1901) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:230) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:972) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:945) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ... 50 more
===============================================================================
非常奇怪,由于google的访问限制,百度了半天也没什么结果,我就知道google一定可以的,果断FQ搜索,果然没有让我失望,
google结果链接:http://stackoverflow.com/questions/22704518/jedispoolconfig-is-not-assignable-to-genericobjectpoolconfig
看情况应该是jar包版本问题,我目前的版本为:jedis-2.1.0.jar + spring-data-redis-1.3.0.RELEASE.jar。
按照提示我将jedis升级成了jedis-2.4.2.jar。
再次运行,成功!!
jedis:exception is java.lang.VerifyError: Bad type on operand stack的更多相关文章
- Jedis:Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception in thread "main" java.lang.VerifyError: Bad type on operand stackException Detai ...
- java.lang.verifyerror:bad type on orerand stack
问题: junit测试的时候报这个错:java.lang.verifyerror:bad type on orerand stack 原因:(多种,自行逐个排查) 1.class not find 引 ...
- 报错:(未解决)java.lang.VerifyError: Instruction type does not match stack map
报错背景: CDH中集成kafka的服务,解决完kafka的jar包报错之后重启,发现这个报错. 报错现象: java.lang.VerifyError: Instruction type does ...
- nested exception is java.lang.VerifyError: Expecting a stackmap frame at bra
Caused by: java.lang.VerifyError: Expecting a stackmap frame (2016-05-19 09:56:29) 转载▼ 标签: it 分类: Ja ...
- IDEA报错: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.datasource.url' in value "${spring.datasource.url}"
运行审核流模块: 在ActivitiServiceApplication模块日志报错: Error starting ApplicationContext. To display the auto-c ...
- Spring 整合 Flex (BlazeDS)无法从as对象 到 Java对象转换的异常:org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.Date' to required type 'java.sql.Timestamp' for property 'wfsj'; nested exception is java.lang.Ill
异常信息如下: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value ...
- Spring系列: 使用aop报错:nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle
写了个最简单的aop例子 配置文件如下 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ...
- j疑难杂症:java.lang.VerifyError: class org.hibernate.type.WrappedMaterializedBlobType overrides final method getReturnedClass.()Ljava/lang/Class;
问题: java.lang.VerifyError: class org.hibernate.type.WrappedMaterializedBlobType overrides final meth ...
- Scala 安装 Exception in thread "main" java.lang.VerifyError: Uninitialized object exists on backward branch 96
windows下载安装完最新版本的Scala(2.12.4)后,终端如下错误 C:\Users\Administrator>scala -versionException in thread & ...
随机推荐
- codeforces 429E
题意:给定n<=100000线段[l,r],然后给这些线段染色(red or blue),求最后平面上任意一个点被蓝色及红色覆盖次数只差的绝对值不大于1 思路:把每条线段拆成2个点[l<& ...
- 使用的组件:Jcrop
JcropImage cropping for jQuery Jcrop 是一个功能强大的 jQuery 图像裁剪插件,结合后端程序(例如:PHP)可以快速的实现图片裁剪的功能. 官网地址:http: ...
- oprofile 安装使用
ubuntu上要编译安装oprofile.现在版本(0.9.9)的oprofile的编译需要binutil-dev libpopt-dev apt-get install binutil-dev li ...
- 更新页面缓存OutputCache
为什么要使用OutputCache 我认为OutputCache是最简单的缓存技术了,它针对的是页面级别的,简单的一条指令就可以达到缓存的效果,有效的减轻服务器的压力和减少带宽,对于网站一些不会频繁更 ...
- YUI Compressor for Sublime text2
YUI Compressor 是一个用来压缩 JS 和 CSS 文件的工具,采用Java开发. 最近压缩文件,常使用在线压缩的方式来压缩文件,一来多有不便,二来如果没有网络,只能搁置了.本文来描述如何 ...
- C#与数据库访问技术总结(十一)之数据阅读器(DataReader)1
数据阅读器 当执行返回结果集的命令时,需要一个方法从结果集中提取数据. 处理结果集的方法有两个: 第一,使用数据阅读器(DataReader): 第二,同时使用数据适配器(Data Adapter)和 ...
- 关于拦截器实现日志存储到db的代码调试
问题是,原来系统有日志操作的代码,但日志最终没有存到数据库. xml中拦截器配置: <mvc:interceptor> <mvc:mapping path="/admin/ ...
- 单线程&浏览器多线程
知乎答案:http://www.zhihu.com/question/31982417/answer/54136684 copy大牛的好文:from http://www.cnblogs.com/Ma ...
- [Python爬虫] 在Windows下安装PhantomJS和CasperJS及入门介绍(上)
最近在使用Python爬取网页内容时,总是遇到JS临时加载.动态获取网页信息的困难.例如爬取CSDN下载资源评论.搜狐图片中的“原图”等,此时尝试学习Phantomjs和CasperJS来解决这个问题 ...
- Java-认识字符集-转载
问题起源 对于计算机而言,它仅认识两个0和1,不管是在内存中还是外部存储设备上,我们所看到的文字.图片.视频等等“数据”在计算机中都是已二进制形式存在的.不同字符对应二进制数的规则,就是字符的编码.字 ...