commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narinder Gaheer" <>
Subject RE: Digester :- Skipping Read Only Property under jdk 1.3.1_09
Date Mon, 08 Dec 2003 19:17:51 GMT
Thanks Simon,

	On investigation of my Java Bean, I found that I had three
methods in it :-

isId() - this method had nothing to do with the Java Bean property "id"

    Probably the BeanUtils was getting confused and picking isId() and
ignoring setId().
The moment I changed the name of isId() method, Digester worked fine.


-----Original Message-----
From: Simon Kitching [] 
Sent: Thursday, December 04, 2003 4:10 PM
To: Jakarta Commons Users List
Cc: Narinder Gaheer
Subject: Re: Digester :- Skipping Read Only Property under jdk 1.3.1_09

Hi Narinder,

That message is coming out of the BeanUtils library. The message implies
that BeanUtils thinks that the java property is a read-only property,
and therefore cannot be set by Digester.

What's probably happening is that the class you are setting properties
on does not correctly implement the JavaBeans standard, and that earlier
versions of BeanUtils just didn't enforce this.

Given this class:

class Foo {
  public String getAlpha() {...}

  public String getBeta() {...}
  public void setBeta(int betaval) {...}

Alpha is a read-only property.
Beta may well be seen as a "read-only" property too, because it doesn't
comply with the Java Beans standard: the datatype used to "set" the
property is different from the datatype used to "get" the property.

If this is indeed the case, then your options are:
(a) Make the class compliant with the JavaBeans standard, or
(b) Use the CallMethodRule rather than the SetPropertiesRule.

I hope this helps,


On Fri, 2003-12-05 at 12:42, Narinder Gaheer wrote:
> Hi ,
>      We have been successfully using Digester to read in our 
> configuration files (under jdk 1.3.1_06). We recently moved to jdk 
> 1.3.1_09 and are seeing "Skipping Read Only" property
> messages when we turn the debug logging on. Anybody out there who can
> throw
> some light on this message.
> Thanks in advance.
> Narinder

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message