Jedis:exception is java.lang.VerifyError:Bad type on operand stack

Source: Internet
Author: User

The cache is required for the project, and after comparison, Redis is selected, the client uses Jedis connections, and the Spring-data-redis is provided by spring. After the configuration is correct, start Tomcat and find the following exception:

=============================================================================

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 stackexception details:location:org/springframework/d Ata/redis/connection/jedis/jedisconnectionfactory.afterpropertiesset () V @109:invokespecial reason:type ' redis/ Clients/jedis/jedispoolconfig ' (current frame, stack[3]) was not assignable to ' org/apache/commons/pool2/impl/ Genericobjectpoolconfig ' current FRAME:BCI: @109 flags: {} Locals: {' Org/springframework/data/redis/connectio N/jedis/jedisconnectionfactory '} stack: {' org/springframework/data/redis/connection/jedis/jedisconnectionfactory ', uninitialized, uninitialized, ' 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 B7XX 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 00000 60:b400 0db6 0020 2ab4 000d b600 21b7 0022 0000070:b500 07b1 stackmap table:same_f Rame (@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) ... morecaused by:java.lang.VerifyError:Bad type on operand stackexception Details:locaTion:org/springframework/data/redis/connection/jedis/jedisconnectionfactory.afterpropertiesset () V @109: Invokespecial reason:type ' redis/clients/jedis/jedispoolconfig ' (current frame, stack[3]) isn't assignable to ' org/a Pache/commons/pool2/impl/genericobjectpoolconfig ' current FRAME:BCI: @109 flags: {} Locals: {' Org/springframe Work/data/redis/connection/jedis/jedisconnectionfactory '} stack: {' org/springframework/data/redis/connection/ Jedis/jedisconnectionfactory ', uninitialized, uninitialized, ' 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 2  AB4 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_f Rame (@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) ... More

===============================================================================

Very strange, because of Google's access restrictions, Baidu has no results for half a day, I know that Google can certainly, decisive fq search, did not let me down,

Google results Link: http://stackoverflow.com/questions/22704518/jedispoolconfig-is-not-assignable-to-genericobjectpoolconfig

The situation should be the jar package version issue, my current version is: Jedis-2.1.0.jar + Spring-data-redis-1.3.0.release.jar.

Follow the prompts and I'll upgrade the Jedis to Jedis-2.4.2.jar.

Run again, success!!

Jedis:exception is java.lang.VerifyError:Bad type on operand stack

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.