struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From james.webs...@cardsetc.com
Subject Digester/BeanUtils weirdness?
Date Wed, 04 Jul 2001 00:09:14 GMT
Hello all,

I'm currently using the Digester to instantiate and populate a hierarchy of
JavaBeans from an XML file. I'm noticing some very peculiar behaviour with
the SetProperties rule. Under certain circumstances, the Digester appears
to be ignoring a particular instance of the SetProperties rule that is used
to populate the graph.

When I run my code in a simple command-line test, everything works fine. I
have run it against both the Xerces and JAXP parsers, with identical
results.

When I run my code in an application server (I have tested both Weblogic
and Tomcat with identical outcomes), the SetProperties rule fails to
populate the bean with the values of the corresponding XML element's
attributes. It seems that the problem may actually be with
BeanUtils.populate(), as I have run a modified version of the SetProperties
class that provides more debug output; the names and value of all
attributes in the AttributeList.

I'll continue investigating shortly, by adding some debug code to
BeanUtils.populate(). In the meantime, does anyone have any explanations as
to why BeanUtils.populate() (and perhaps the introspection code it uses to
obtain the setters for the bean's properties) won't work in an application
server environment, but does within a plain JVM environment?

Regards,
James W.


Mime
View raw message