commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Stansberry <>
Subject Re: [beanutils] [logging]j2ee unit tests added: memory leak demonstrated (?)
Date Thu, 17 Mar 2005 06:29:39 GMT

--- Simon Kitching <> wrote:
> I should have been a little clearer about
> MemoryTestCase.
> There are two tests that are failing:
> * testComponentRegistersCustomConverter
> This fails for a reasonably obvious reason, and it's
> the same one that is already documented in the
> javadoc
> for JCL's WeakHashtable class. Unfortunately as this
> test shows, it will be encountered quite often when
> people use beanutils converter functionality in a
> j2ee-like environment.
> * testComponentRegistersStandardConverter
> This fails for no reason I can understand. It is
> very similar
> to testComponentRegistersCustomConverter except that
> it does
> not involve loading a class via a child classloader,
> and
> therefore should not trigger the bug I believe
> exists. 
> And yes, commending out the reference to
> FloatConverter in the 
> testComponentRegistersStandardConverter test does
> make it pass;
> the million-dollar question is: why does the test
> fail when
> FloatConverter is used? Maybe it's because when
> running 
> "maven test", the unit test code is actually run
> within a
> custom classloader? Does maven itself use BeanUtils?
> Hmm..

Ahh, I had run the tests inside Eclipse, and
testComponentRegistersStandardConverter passed.

Could very well be due to maven (which I know very
little about).  

Just to add further confusion, I added a target to the
beanutils build.xml to run the MemoryTestCase, and
testComponentRegistersStandardConverter failed.

I threw in a System.out.println to record the
classname of origContextClassLoader; in Eclipse it's
sun.misc.Launcher$AppClassLoader; in both maven and
ant it's


Do you Yahoo!? 
Make Yahoo! your home page

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

View raw message