You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ClassCastException on getReturnedDomainClass for parametrized types.
The query:
@NamedQuery(name = "ContentFlag.getNewFlagCountByReasonForTitleId", query = "select new map ( c.reason as reason, count(*) as numFlags ) "
+ "from ContentFlag c where c.content.title.id = ?1"
+ " and (c.dateFlagSet > c.content.statistics.dateFlagCleared or c.content.statistics.dateFlagCleared is null) "
+ "group by c.reason")
The method:
public abstract java.util.List com.qualcomm.qis.plaza.repo.ContentFlagRepository.getNewFlagCountByReasonForTitleId(java.lang.Long)
Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
at org.springframework.data.repository.util.ClassUtils.getReturnedDomainClass(ClassUtils.java:63)
at org.springframework.data.repository.query.QueryMethod.getDomainClass(QueryMethod.java:107)
at org.springframework.data.jpa.repository.query.JpaQueryMethod.getNamedQueryName(JpaQueryMethod.java:126)
at org.springframework.data.jpa.repository.query.NamedQuery.lookupFrom(NamedQuery.java:71)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$DeclaredQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:132)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:73)
at org.springframework.data.repository.support.RepositoryFactorySupport$QueryExecuterMethodInterceptor.<init>(RepositoryFactorySupport.java:259)
at org.springframework.data.repository.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:143)
at org.springframework.data.repository.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:107)
at org.springframework.data.repository.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:36)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 36 more
Andres March opened DATAJPA-45 and commented
ClassCastException on getReturnedDomainClass for parametrized types.
The query:
The method:
The actual return type:
The line where the exception is thrown:
The exception:
Referenced from: commits spring-projects/spring-data-commons@680a74c
The text was updated successfully, but these errors were encountered: