java.lang.ClassCastException: org.hibernate.cache.ReadWriteCache$Item incompatible with net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy$Lockable

Terracotta Project Issue Tracker | Petr H | 6 years ago
  1. 0

    Specifying ehcache via <entry key="hibernate.cache.region.factory_class" value="net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory"/> is broken with Hibernate 3.5.6 (and also at least with 3.5.3): java.lang.ClassCastException: org.hibernate.cache.ReadWriteCache$Item incompatible with net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy$Lockable at net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy.get(AbstractReadWriteEhcacheAccessStrategy.java:65) at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:586) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:459) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:990) at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:610) no problem with older style setup: <entry key="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/> Please also review other stuff from the net.sf.ehcache.hibernate.strategy package as it may likely affect other cache types.

    Terracotta Project Issue Tracker | 6 years ago | Petr H
    java.lang.ClassCastException: org.hibernate.cache.ReadWriteCache$Item incompatible with net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy$Lockable
  2. 0

    Specifying ehcache via <entry key="hibernate.cache.region.factory_class" value="net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory"/> is broken with Hibernate 3.5.6 (and also at least with 3.5.3): java.lang.ClassCastException: org.hibernate.cache.ReadWriteCache$Item incompatible with net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy$Lockable at net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy.get(AbstractReadWriteEhcacheAccessStrategy.java:65) at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:586) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:459) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:997) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:990) at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:610) no problem with older style setup: <entry key="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/> Please also review other stuff from the net.sf.ehcache.hibernate.strategy package as it may likely affect other cache types.

    Terracotta Project Issue Tracker | 6 years ago | Petr H
    java.lang.ClassCastException: org.hibernate.cache.ReadWriteCache$Item incompatible with net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy$Lockable
  3. 0

    net.sf.ehcache.Element.getKey()

    ehcache | 1 decade ago | sureshsetty
    java.lang.ClassCastException: org.hibernate.cache.ReadWriteCache$Item
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NullPointerException in Custom ClassLoader - Can't find zipEntry

    codegur.com | 11 months ago
    java.lang.ClassCastException: com.ibm.wbit.al.config.impl.ALConfigPackageImpl incompatible with org.eclipse.emf.ecore.EPackage
  6. 0

    javax.sql.rowset.serial.SerialBlob incompatible with oracle.sql.BLOB

    Stack Overflow | 2 years ago
    java.lang.ClassCastException: javax.sql.rowset.serial.SerialBlob incompatible with oracle.sql.BLOB

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.hibernate.cache.ReadWriteCache$Item incompatible with net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy$Lockable

      at net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy.get()
    2. Ehcache
      AbstractReadWriteEhcacheAccessStrategy.get
      1. net.sf.ehcache.hibernate.strategy.AbstractReadWriteEhcacheAccessStrategy.get(AbstractReadWriteEhcacheAccessStrategy.java:65)
      1 frame
    3. Hibernate
      SessionImpl.get
      1. org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:586)
      2. org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:459)
      3. org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
      4. org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
      5. org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
      6. org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080)
      7. org.hibernate.impl.SessionImpl.get(SessionImpl.java:997)
      8. org.hibernate.impl.SessionImpl.get(SessionImpl.java:990)
      8 frames
    4. Hibernate EJB
      AbstractEntityManagerImpl.find
      1. org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:610)
      1 frame