wood burning stoves*
The moose likes Object Relational Mapping and the fly likes java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType" Watch "java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType" New topic
Author

java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

jason williams
Greenhorn

Joined: Nov 17, 2004
Posts: 14
I read the article on Hibernate webiste - https://www.hibernate.org/328.html and practise to test if my concept is correcet or not. However, I always obtained the following error message



The code includes







No matter whether I switch to use the way the article discuss or the one I try (in Child constructor), it all fails. I think I have problem with the concept, but no idea where I make mistakes. Is the constructor trying to obtain the type in super class (i.e. T in Father.java)?

I appreciate any help.

Thank in advice.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
 
Similar Threads
Generics version of "new T()"?
passing generic type to some method
Would like to get the Type of a member of a class, I'm boxing with Generic, java erasure
How to get generic type?
EasyMock'ing JPA