java.lang.ClassCastException: org.hibernate.cache.spi.NaturalIdCacheKey cannot be cast to org.hibernate.cache.spi.CacheKey

Hibernate JIRA | Lukasz Antoniak | 3 years 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.

Root Cause Analysis

  1. java.lang.ClassCastException

    org.hibernate.cache.spi.NaturalIdCacheKey cannot be cast to org.hibernate.cache.spi.CacheKey

    at org.hibernate.stat.internal.ConcurrentNaturalIdCacheStatisticsImpl.getEntries()
  2. Hibernate
    ConcurrentNaturalIdCacheStatisticsImpl.getEntries
    1. org.hibernate.stat.internal.ConcurrentNaturalIdCacheStatisticsImpl.getEntries(ConcurrentNaturalIdCacheStatisticsImpl.java:148)
    1 frame