File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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