cannot access a member of class org.springframework.cloud.sleuth.instrument.session.TraceSessionRepository with modifiers "public"
stefan-g opened this issue · 1 comments
After updating org.springframework.cloud:spring-cloud-dependencies from 2021.0.5 to 2021.0.6 i got the following exception:
java.lang.IllegalStateException: Could not access method or field: class org.springframework.util.ReflectionUtils cannot access a member of class org.springframework.cloud.sleuth.instrument.session.TraceSessionRepository with modifiers "public"
spring-cloud-dependencies updates spring-cloud-sleuth-instrumentation from version 3.1.5 to 3.1.7.
It seems to be related to TraceSessionRepositoryAspect#callMethodOnWrappedObject
When i set in this method the value method.setAccessible(true) during debugging than it works.
Logs:
o.s.c.s.i.s.TraceSessionRepositoryAspect : Found an exact match for method execution [public org.springframework.session.Session org.springframework.cloud.sleuth.instrument.session.TraceSessionRepository.createSession()]
o.s.c.s.i.s.TraceSessionRepositoryAspect : Found a corresponding method on the trace representation [public org.springframework.session.Session org.springframework.cloud.sleuth.instrument.session.TraceSessionRepository.createSession()]
.m.m.a.ExceptionHandlerExceptionResolver : Resolved [java.lang.IllegalStateException: Could not access method or field: class org.springframework.util.ReflectionUtils cannot access a member of class org.springframework.cloud.sleuth.instrument.session.TraceSessionRepository with modifiers "public"]
I'm using spring-boot 2.7.8 with spring-data-redis:2.7.8 and redisson-spring-boot-starter:3.18.0
Any idea why this doesn't work anymore?
Duplicate of #2267