- LettuceConnectionConfiguration configuration needs to call setTimeBetweenEvictionRuns, setMaxWait method, but high version of the ommons-pool2 has no these two methods, lead to start an error. And maxWait has a default value, so you can't set it to not call either method
- error msg
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$PoolBuilderFactory.getPoolConfig(LettuceConnectionConfiguration.java:188)
The following method did not exist:
'void org.apache.commons.pool2.impl.GenericObjectPoolConfig.setMaxWait(java.time.Duration)'
The calling method's class, org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$PoolBuilderFactory, was loaded from the following location:
jar:file:/Users/zhou/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/2.6.7/d96e51e7a13f16c07f60654071f157f99a0b99be/spring-boot-autoconfigure-2.6.7.jar!/org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration$PoolBuilderFactory.class
The called method's class, org.apache.commons.pool2.impl.GenericObjectPoolConfig, is available from the following locations:
jar:file:/Users/zhou/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-pool2/2.8.1/4f89525d29a81305edea6c504fd3b1ecf7ecd16e/commons-pool2-2.8.1.jar!/org/apache/commons/pool2/impl/GenericObjectPoolConfig.class
The called method's class hierarchy was loaded from the following locations:
org.apache.commons.pool2.impl.GenericObjectPoolConfig: file:/Users/zhou/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-pool2/2.8.1/4f89525d29a81305edea6c504fd3b1ecf7ecd16e/commons-pool2-2.8.1.jar
org.apache.commons.pool2.impl.BaseObjectPoolConfig: file:/Users/zhou/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-pool2/2.8.1/4f89525d29a81305edea6c504fd3b1ecf7ecd16e/commons-pool2-2.8.1.jar
org.apache.commons.pool2.BaseObject: file:/Users/zhou/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-pool2/2.8.1/4f89525d29a81305edea6c504fd3b1ecf7ecd16e/commons-pool2-2.8.1.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$PoolBuilderFactory and org.apache.commons.pool2.impl.GenericObjectPoolConfig
- screenshots
Comment From: wilkinsona
Spring Boot 2.6 requires Commons Pool 2.11.x.
Comment From: zxuanhong
@wilkinsona Thank you very much