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

onetoone mapping with hibernate and JSP

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289

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(BeanWrapperImpl.java:707)
at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:699)


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

-Chiru
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 461
    
    4
adress.streetaddress
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: onetoone mapping with hibernate and JSP