-
May 31st, 2011, 03:13 PM
#1
generics in JPA namedQueries problem in spring data jpa
I have a pretty tricky problem and I think it is related to Spring Data Jpa, I am using 1.0.0.M2.
the named queries work fine if I used generics like this: List<A> methodABCD();
but if I want to use List<A<B>> it stops to work. The error I got is the following.
(does anybody use Generics like this?) .. Thanks in advance.
Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.Parameteriz edTypeImpl cannot be cast to java.lang.Class
at org.springframework.data.repository.util.ClassUtil s.getReturnedDomainClass(ClassUtils.java:63)
at org.springframework.data.repository.query.QueryMet hod.getDomainClass(QueryMethod.java:107)
at org.springframework.data.jpa.repository.query.JpaQ ueryMethod.getNamedQueryName(JpaQueryMethod.java:1 26)
at org.springframework.data.jpa.repository.query.Name dQuery.lookupFrom(NamedQuery.java:71)
-
Jun 1st, 2011, 11:52 AM
#2
Ok, this is actually fixed in the spring data jpa snapshot. -cy
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules