Note: environment is Win7 64-bit, JDK 1.7.0_01 61-bit, Hibernate 3.6.7.Final & Oracle.
I've hit a bug similar to https://jira.springsource.org/browse/DATAJPA-45 with Spring Data JPA 1.1.0.M1. In DATAJPA-45, the ClassCastException has to do with ParameterizedTypeImpl, whereas the bug I see has to do with TypeVariableImpl.
After seeing that DATAJPA-45 was fixed in Spring Data Commons, I updated Spring Data JPA to version 1.1.0.BUILD-SNAPSHOT and got a different error:Code:Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class at org.springframework.data.repository.util.ClassUtils.getReturnedDomainClass(ClassUtils.java:60) at org.springframework.data.repository.query.QueryMethod.getDomainClass(QueryMethod.java:127) at org.springframework.data.repository.query.QueryMethod.getNamedQueryName(QueryMethod.java:120) at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$DeclaredQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:118) at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:157) at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:71) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:268) at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:142) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:114) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:38) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) ... 43 more
Any ideas?Code:Caused by: java.lang.IllegalArgumentException: No property find found for type class com.ea.nucleus.db.user.UserDB at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:73) at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:92) at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:312) at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:326) at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:294) at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:258) at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:239) at org.springframework.data.repository.query.parser.Part.<init>(Part.java:69) at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:180) at org.springframework.data.repository.query.parser.PartTree$Predicate.buildTree(PartTree.java:260) at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:240) at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:68) at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:56) at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:92) at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:159) at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:71) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:268) at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:142) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:114) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:38) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) ... 43 more
Thanks,
Matthew


Reply With Quote
