Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onetoone mapping with hibernate and JSP

 
Chiranjeevi Kanthraj
Ranch Hand
Posts: 290
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
adress.streetaddress
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic