This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean property 'xxxxx' is not readable or has an invalid getter

 
Gil Carvalho
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I'mt trying to put 2 objects in my jsp view but one works the other one no giving me the error mentioned,

This is my controller


And this is my jsp view


The error is here at line 88:



org.springframework.beans.NotReadablePropertyException: Invalid property 'tipoEmpredado' of bean class [gmc.gestaxi.domain.Empregado]: Bean property 'tipoEmpredado' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
What's wrong please?

Thank you
 
Paul Clapham
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Xil Car wrote:Invalid property 'tipoEmpredado' of bean class [gmc.gestaxi.domain.Empregado]: Bean property 'tipoEmpredado' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?


The error message is asking a question about your Empregado class. Apparently your code needs to have a getTipoEmpredado method. And does it? You haven't posted the code of that class so you would have to look at the code yourself.

(I don't know the language of your code -- Portuguese? -- but it looks to me like either "Empregado" or "tipoEmpredado" is misspelled.)
 
Gil Carvalho
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thank you for your answer. Yes it is Portuguese

This is my Empregado Class. (Employee)



This error happens when i'm trying to use another object


If i don't use, there is no error

The other class is TipoEmregado (Employee Type)

 
Paul Clapham
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay. So in one place you have "tipoEmpredado" and in another place you have "tipoEmpregado".
 
Gil Carvalho
Ranch Hand
Posts: 79
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thank you.
That was the mistake. Ican't believe i was looking for that error for hours.

Thank you Paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic