File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes onetoone mapping with hibernate and JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "onetoone mapping with hibernate and JSP" Watch "onetoone mapping with hibernate and JSP" New topic

onetoone mapping with hibernate and JSP

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 290

Hi all

i am learning hibernate and spring
i have made a one-to-one mapping for Employee and Address tables,

where Employee and Address are different entity as below

and the Address as below

And the JSP as below

Sorry i dont know how to format the JSP

Problem is if submit only the employee related data works fine
if i add the address details in the JSP and submit it throws exception

org.springframework.beans.NotReadablePropertyException: Invalid property 'streetaddress' of bean class [com.employee.entity.EmployeeEntity]: Bean property 'streetaddress' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
at org.springframework.beans.BeanWrapperImpl.getPropertyValue(
at org.springframework.beans.BeanWrapperImpl.getPropertyValue(

How to fix this.. which setter need to add in JSP

H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 471
I agree. Here's the link:
subject: onetoone mapping with hibernate and JSP
jQuery in Action, 3rd edition