geronimo-xbean-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gOrr <gorrlis...@gmail.com>
Subject Re: problems mapping attributes with xbean-spring-3.1
Date Wed, 03 Oct 2007 06:50:19 GMT
Get and Set methods have been autogenerated by eclipse:
 package test;
 public myClass {
   private String myAttribute:

   public void setMyAttribute(String myAttribute) {
      this.myAttribute=myAttribute;
   }

   public String getMyAttribute() {
      return myAttribute;
   }

 }

I guess that if the mapping "object.attribute=myAttribute" were working
correctly, the message error should be: "Invalid property 'myAttribute" of
bean class [ test.myClass]..." and not "Invalid property 'attribute" of bean
class [ test.myClass]...".

Thanks.


On 10/2/07, Jacek Laskowski <jacek@laskowski.net.pl> wrote:
>
> On 10/2/07, gOrr <gorrlistas@gmail.com> wrote:
>
> > package test;
> > public myClass {
> >   private String myAttribute:
> >   //getter and setter...
> > }
> ...
> > I received this exception:
> > Caused by: org.springframework.beans.NotWritablePropertyException:
> Invalid
> > property 'attribute of bean class [test.myClass]: Bean property
> 'attribute'
> > is not writable or has an invalid setter method. Does the parameter type
> of
> > the setter match the return type of the getter?
>
> Hi,
>
> Can you show the entire myClass class with setters and getters?
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message