java.lang.ClassCastException: [Lau.com.agrichem.addams.server.model.enums.SchedulingStatus; cannot be cast to java.lang.Enum

Stack Overflow | druiz | 6 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

    JPA Query: java.lang.ClassCastException: [Enum] cannot be cast to java.lang.Enum

    Stack Overflow | 6 months ago | druiz
    java.lang.ClassCastException: [Lau.com.agrichem.addams.server.model.enums.SchedulingStatus; cannot be cast to java.lang.Enum
  2. 0

    Hibernate criteria query throws an exception

    Stack Overflow | 2 years ago
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
  3. 0

    When loading a bytecode enhanced lazy collection of a cached entity, an exception is thrown: {code} java.lang.ClassCastException: org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer$1 cannot be cast to java.util.Collection at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:245) at org.hibernate.type.CollectionType.renderLoggableString(CollectionType.java:209) at org.hibernate.type.CollectionType.toLoggableString(CollectionType.java:202) at org.hibernate.type.TypeHelper.toLoggableString(TypeHelper.java:377) at org.hibernate.cache.spi.entry.StandardCacheEntryImpl.<init>(StandardCacheEntryImpl.java:60) at org.hibernate.persister.entity.AbstractEntityPersister$StandardCacheEntryHelper.buildCacheEntry(AbstractEntityPersister.java:5219) at org.hibernate.persister.entity.AbstractEntityPersister.buildCacheEntry(AbstractEntityPersister.java:4230) at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:182) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:125) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1146) at org.hibernate.loader.Loader.processResultSet(Loader.java:1005) at org.hibernate.loader.Loader.doQuery(Loader.java:943) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349) at org.hibernate.loader.Loader.doList(Loader.java:2615) at org.hibernate.loader.Loader.doList(Loader.java:2598) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2430) at org.hibernate.loader.Loader.list(Loader.java:2425) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:502) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1460) at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1426) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1398) at org.hibernate.query.internal.AbstractProducedQuery.getSingleResult(AbstractProducedQuery.java:1444) at org.hibernate.query.criteria.internal.compile.CriteriaQueryTypeQueryAdapter.getSingleResult(CriteriaQueryTypeQueryAdapter.java:107) {code}

    Hibernate JIRA | 5 months ago | Giovanni Lovato
    java.lang.ClassCastException: org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer$1 cannot be cast to java.util.Collection
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassCastException

    [Lau.com.agrichem.addams.server.model.enums.SchedulingStatus; cannot be cast to java.lang.Enum

    at org.hibernate.type.EnumType.nullSafeSet()
  2. Hibernate
    SessionImpl.list
    1. org.hibernate.type.EnumType.nullSafeSet(EnumType.java:239)
    2. org.hibernate.type.CustomType.nullSafeSet(CustomType.java:170)
    3. org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:53)
    4. org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:628)
    5. org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1956)
    6. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1909)
    7. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1887)
    8. org.hibernate.loader.Loader.doQuery(Loader.java:932)
    9. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)
    10. org.hibernate.loader.Loader.doList(Loader.java:2615)
    11. org.hibernate.loader.Loader.doList(Loader.java:2598)
    12. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2430)
    13. org.hibernate.loader.Loader.list(Loader.java:2425)
    14. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:502)
    15. org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
    16. org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
    17. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1458)
    17 frames
  3. org.hibernate.query
    AbstractProducedQuery.list
    1. org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1426)
    2. org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1398)
    2 frames
  4. Hibernate
    Query.getResultList
    1. org.hibernate.Query.getResultList(Query.java:417)
    1 frame
  5. au.com.agrichem
    SchedulingsServiceImpl.getScheduling
    1. au.com.agrichem.addams.server.model.repositories.base.HibernateDaoImpl.getSingleResult(HibernateDaoImpl.java:100)
    2. au.com.agrichem.addams.server.model.repositories.impl.SchedulingsDaoImpl.getCurrentSchedulingByFarm(SchedulingsDaoImpl.java:126)
    3. au.com.agrichem.addams.server.services.impl.SchedulingsServiceImpl.getScheduling(SchedulingsServiceImpl.java:68)
    3 frames