question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig'

See original GitHub issue
    <dependency>
        <groupId>redis.clients</groupId>
        <artifactId>jedis</artifactId>
        <version>2.7.3</version>
    </dependency>

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-pool2</artifactId>
        <version>2.3</version>
    </dependency>

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.data.redis.core.RedisTemplate com.icarbonx.service.RedisService.redisTemplate; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘redisTemplate’ defined in file [D:\java\apache-tomcat-7.0.65\webapps\main\WEB-INF\classes\spring-redis.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.createRedisPool()Lredis/clients/util/Pool; @37: invokespecial Reason: Type ‘redis/clients/jedis/JedisPoolConfig’ (current frame, stack[2]) is not assignable to ‘org/apache/commons/pool2/impl/GenericObjectPoolConfig’ Current Frame: bci: @37 flags: { } locals: { ‘org/springframework/data/redis/connection/jedis/JedisConnectionFactory’ } stack: { uninitialized 0, uninitialized 0, ‘redis/clients/jedis/JedisPoolConfig’, ‘java/lang/String’, integer, integer, ‘java/lang/String’ } Bytecode: 0x0000000: bb00 2c59 2ab6 0028 2ab6 0012 b600 2d2a 0x0000010: b600 12b6 002e 2a2a b600 12b7 0029 2ab6 0x0000020: 0012 b600 2ab7 002f b0

at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:571)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 58 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘redisTemplate’ defined in file [D:\java\apache-tomcat-7.0.65\webapps\main\WEB-INF\classes\spring-redis.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.createRedisPool()Lredis/clients/util/Pool; @37: invokespecial Reason: Type ‘redis/clients/jedis/JedisPoolConfig’ (current frame, stack[2]) is not assignable to ‘org/apache/commons/pool2/impl/GenericObjectPoolConfig’ Current Frame: bci: @37 flags: { } locals: { ‘org/springframework/data/redis/connection/jedis/JedisConnectionFactory’ } stack: { uninitialized 0, uninitialized 0, ‘redis/clients/jedis/JedisPoolConfig’, ‘java/lang/String’, integer, integer, ‘java/lang/String’ } Bytecode: 0x0000000: bb00 2c59 2ab6 0028 2ab6 0012 b600 2d2a 0x0000010: b600 12b6 002e 2a2a b600 12b7 0029 2ab6 0x0000020: 0012 b600 2ab7 002f b0

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
skyyan2000commented, Mar 15, 2017

i met too ,the same reason i used 2.9.0 but can not handle

     <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
			<version>2.9.0</version>
      </dependency> 
1reaction
caiyao199289commented, Nov 11, 2018

Please How to resolve this problem,everyone met is?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack ...
Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[2]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig' #1171.
Read more >
JedisPoolConfig is not assignable to GenericObjectPoolConfig
Had exactly the same problem when I upgraded to Spring Data Redis v1.2.1-RELEASE. I solved the problem after upgrading Jedis to the latest...
Read more >
org/apache/commons/pool2/impl/GenericObjectPoolConfig
Type redis/clients/jedis/JedisPoolConfig (current frame, stack[1]) is not assignable to org/apache/commons/pool2/impl/GenericObjectPoolConfig. You might get ...
Read more >
JedisConnectionFactory send error: java.lang.VerifyError: Bad ...
Type 'redis/clients/jedis/JedisPool' (current frame, stack[0]) is not assignable to 'redis/clients/jedis/util/Pool' (from method signature)
Read more >
Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack ...
Type 'redis/clients/jedis/JedisPoolConfig' (current frame, stack[1]) is not assignable to 'org/apache/commons/pool2/impl/GenericObjectPoolConfig ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found