Did some more testing, and switched to using reflection in my own testcase so I was able to remove those jars mentioned below from the classpath of my other testcases. This indeed eliminates the problem.
Happy testing, Olaf > -----Original Message----- > From: Olaf Bergner [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 31, 2003 12:47 AM > To: Avalon framework users > Subject: RE: Merlin Dynamic Block Un/Loading > > > OK, think I got it. My rewrite of the AbstractMerlinTestCase > eliminated the > use of reflection. So instead of > > [AMTC] > m_kernel = factory.create( criteria ); > m_shutdown = m_kernel.getClass().getMethod( "shutdown", new Class[0] ); > > I simply do > > m_kernel = (Kernel) factory.create(criteria); > ... > m_kernel.shutdown(); > > to the same effect. I didn't see any reason why I should keep to the > reflection way, since this works just fine. BUT, every testcase > derived from > my non-reflection testcase has to be run with some merlin jars on the > classpath, i.e. avalon-activation-api, avalon-composition-api, > avalon-meta-api and merlin-api since otherwise the testcase won't load. > > For some reason unbeknownst to my feeble mind this causes the LinkageError > on each second test method. At least I was able to eliminate the > problem by > switching to AMTC and removing the above mentioned dependencies from > project.xml (maven). I came to this conclusion only a few minutes ago and > did only some preliminary testing, but I am quite confident in > this. Still, > I would be glad if somebody out there could confirm this. > > Cheers, > > Olaf > > > -----Original Message----- > > From: Stephen McConnell [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 30, 2003 3:06 AM > > To: Avalon framework users > > Subject: Re: Merlin Dynamic Block Un/Loading > > > > > > > > > > Olaf Bergner wrote: > > > > >>> > > >>> > > >> (5) Second test method fails during setUp() > > >> > > >>Not in my example > > >>Take a look at avalon-sandbox/merlin-test/hello > > >>It has to be something else. > > >> > > >> > > >> > > > > > >You are right: it has to be something else. I took your > template project, > > >tweaked merlin.properties a bit and added avalon.properties so that > > >everything builds just fine and StandardTestCase passes. Then > I added an > > >empty test method to StandardTestCase. Works like a charm, > absolutely no > > >problems. Merlin shuts down and restarts just fine. Now what's going on > > >here? I don't get it. Did you notice something special about Fernando's > > >setup? > > > > > > > Fernando's setup is a pure junit.framework.TestCase - nothing > > special. In each test he's creating a new kernel (no difference > > if you move this to the setUp() method). > > > > > > >Anyway, it's getting late here in Germany. > > > > > > > Here in France as well! > > > > >I'll call it a night and put this > > >mistery back on the shelf, right next to my monograph about unsolved > > >problems in superstring theory. > > > > > > > > > > ROTFL - I'm thinking along the same lines as you. > > > > :-) > > > > Stephen. > > > > Stephen J. McConnell > > mailto:[EMAIL PROTECTED] > > > > |------------------------------------------------| > > | Magic by Merlin | > > | Production by Avalon | > > | | > > | http://avalon.apache.org/merlin | > > | http://dpml.net/ | > > |------------------------------------------------| > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
