This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes  org.hibernate.PropertyAccessException 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 " org.hibernate.PropertyAccessException" Watch " org.hibernate.PropertyAccessException" New topic
Author

org.hibernate.PropertyAccessException

indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Hi all am using a many to many relationship and when I try to save the object , it shows the exception..

my mapping file is :::
course bean is :::


please please, am changing by googling but still getting the exception.. please help me ...


thanks ,
Indu
Waswani Naresh
Ranch Hand

Joined: May 01, 2008
Posts: 66
Please provide your POJO classes as well.

Regards,
Naresh Waswani


Naresh Waswani
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
oh ! I posted mapping file again instead of pojo ..
Course pojo ::
Waswani Naresh
Ranch Hand

Joined: May 01, 2008
Posts: 66
Please provide RegisterStudent POJO and the code for inserting the object as well.

Regards,
Naresh Waswani
Rishi Shehrawat
Ranch Hand

Joined: Aug 11, 2010
Posts: 218

Could you also provide complete stack trace.

Interesting thing is that for the courseID field you have specified access="field" in your mapping file, still Hibernate is trying to use getter.
 
Consider Paul's rocket mass heater.
 
subject: org.hibernate.PropertyAccessException
 
Similar Threads
mapping exception with generator - sequence
problem in one-to-many mapping
org.hibernate.NonUniqueObjectException
org.hibernate.exception.SQLGrammarException: could not insert: [com.Course]
sequence generator with mysql