[AppClassLoader@18b4aac2] error can't determine implemented interfaces of missing type org.springframework.cache.ehcache.EhCacheCacheManager
when weaving type org.springframework.boot.autoconfigure.cache.EhCacheCacheConfiguration
when weaving classes
when weaving
[Xlint:cantFindType]
[AppClassLoader@18b4aac2] error can't determine implemented interfaces of missing type org.springframework.cache.ehcache.EhCacheCacheManager
when weaving type org.springframework.boot.autoconfigure.cache.EhCacheCacheConfiguration
when weaving classes
when weaving
What this warnings are actually about?
I have created one @Aspect class in my app, and it is working correctly.
My knowledge atm is not deep. Only I know that moment exists when the app weave my aspect to the classes where it should be used.
Warnings are confusing me. Why the app wants to weave classes I see in this logs?
PS stackoverflow gave me an answer how to avoid warnings (aop.xml). But I would like to know what the reason of this warning initially. Will it be the problem in the future.
It looks like your pointcut is too broad, trying to weave into all existing Spring components, including Spring's own ones, fox example class EhCacheCacheConfiguration
, which is a Spring Boot class. Obviously, that class references Spring Core class EhCacheCacheManager
which is unavailable at the time of trying to weave the aspect into the configuration class or into one of the components/beans declared there.
This is a classical boot-strapping problem with global "weave the whole world" aspects. I do not think that an aop.xml
file will help you here, because probably, like most users, you are using the default AOP framework Spring AOP, not native AspectJ, but aop.xml
is only for AspectJ load-time weaving configuration. What you want to do instead is to limit the target scope of your aspect by adding something like && within(my.target.package..*)
to the pointcut. Probably the error goes away then.