aspose file tools*
The moose likes Object Relational Mapping and the fly likes Getting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Getting "object is not an instance of declaring class" exception. Please help." Watch "Getting "object is not an instance of declaring class" exception. Please help." New topic
Author

Getting "object is not an instance of declaring class" exception. Please help.

Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

Hi All,

I am practicing with associations in Hibernate. While trying one-to-many and many-to-one association i am getting below error:



related java pojo's are

and


Hibernate mapping fileas are:


I am using below code to insert the subcategories :


Please help. I have tried to search the related topic, but could not help.
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

Got it.
There was a problem in mapping.
shakthi balaji
Greenhorn

Joined: Oct 13, 2010
Posts: 3
Hi. I'm also getting the same problem( The scenario is exactly same). Could you please tell me what did you changed in your mapping?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting "object is not an instance of declaring class" exception. Please help.