https://kotlinlang.org logo
g

Gyu hyeon Lee

02/18/2021, 7:17 PM
Spent a whole day on the error "Class A cannot be cast to Class A" when trying to access
@Cacheable
method return value when it clearly should be working since I literally just put the same class instance into the cache when I called the method for the first time 1 second ago... Couldn't find a single article that helped me on the issue.
mvn clean
didn't help either. ... It worked after I invalidated intellij cache and restarted IDE. I love my life sometimes.
🥴 1
🚔 1
2
n

nfrankel

02/18/2021, 8:54 PM
1. it’s not related to kotlin 2. it probably doesn’t belong to general 3. it’s probably related to a class loading issue. two classes are not the same if they are loaded by two different class loaders
2 Views