java.lang.ClassCastException: java.lang.ref.SoftReference cannot be cast to java.util.concurrent.ConcurrentHashMap

GitHub | ming300 | 4 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 21#253159784

    GitHub | 4 months ago | ming300
    java.lang.ClassCastException: java.lang.ref.SoftReference cannot be cast to java.util.concurrent.ConcurrentHashMap
  2. 0

    怀疑 exCache 中配置的hfield不起作用,已解决,因为hfield的值为null,需要配condition

    GitHub | 4 months ago | ming300
    java.lang.ClassCastException: java.lang.ref.SoftReference cannot be cast to java.util.concurrent.ConcurrentHashMap

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.ref.SoftReference cannot be cast to java.util.concurrent.ConcurrentHashMap

      at com.jarvis.cache.map.CachePointCut.setCache()
    2. com.jarvis.cache
      AspectjAopInterceptor.proceed
      1. com.jarvis.cache.map.CachePointCut.setCache(CachePointCut.java:103)
      2. com.jarvis.cache.AbstractCacheManager.writeCache(AbstractCacheManager.java:221)
      3. com.jarvis.cache.AbstractCacheManager.proceed(AbstractCacheManager.java:124)
      4. com.jarvis.cache.aop.aspectj.AspectjAopInterceptor.proceed(AspectjAopInterceptor.java:49)
      4 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    4. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
      2. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
      3. org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
      4 frames
    5. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      3 frames
    6. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      4 frames