• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

WrongClassException in Inheritance Mapping  RSS feed

 
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to map an inheritance relationship, but i am getting an error.
This is my mapping file:


This is the method where the exception is thrown:



and the exception:



Can someone help me? i am stuck at this.

Thanks in advance for early responses
 
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My only guess is that it is related to your use of generics.

<?> I would think you would want something line <? super Category> or is it <? extends Category> My brain isn't quite working at this very moment.

Mark
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Mark,

I originally wrote that post in the hibernate forums, and that guy "Ankur Sharma" has copied it (please, Ankur Sharma, post your own questions).

this is the link to my post in the Hibernate forums:
http://forum.hibernate.org/viewtopic.php?t=987425

Thanks for the help

P.S. Edited to add the link
[ June 04, 2008: Message edited by: Diego Garcia ]
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Diego Garcia, please check your private messages.
[ June 04, 2008: Message edited by: Paul Sturrock ]
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recall nearly driving myself insane trying to figure out where this WrongClassException kept coming from. Just as I was about ready to axe-murder some bunnies, I took a final look at the hibernate.cfg.xml file and noticed that i had failed to include the particular entity's mapping file.
Which made no sense to me, because I expected an entirely different exception, but that was the reality of it nonetheless. So, double checking your mapping definitions in hibernate.cfg.xml might be worth it - please, think of the bunnies.
 
Diego Garcia
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help, Jelle, but no luck for me. I have included the entity's mapping file...any other idea? anyone?

Thanks in advance
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankur Sharma, please check your private messages.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!