> -----Original Message----- > From: Stephen McConnell [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 23, 2003 4:35 PM > ... > > I'm trying to think why this would happen. Basically if I understand > correctly, Merlin has created a classloader and populated it with the > content you have specified in you block. The scanner then kicks in to > establsh the available components by read the metainfo from the .xinfo > resources. The TypeBuilder is supplied the component class from which > it gets the class's classloader to read the xinfo. In you the classloader > is not finding the xinfo. > > This means one thing - the class in question already exists in a parent > classloader - but the xinfo is not present in that parent. This suggests > that maybe you have a duplication of classes referenced in the jar file > component-impl-0.1.jar and classes in target/classes. > > > > >classLoader is the classloader that loaded the class itself, it > should also > >load the .xinfo file in the same package. Or is it a classloader issue? > > > > There is clearly a conflict going on at the classloader level. The class > exists but its not being loaded from the jar file. To find out > what is going > on, set the following properties in merlin.properties > > merlin.debug = true > merlin.info = true > > Then run maven with debug enabled: > > maven -X test > > As the test cases kicks you will see merlin system debug messages and you > will also see junit messages. From this you should be able to figer out > where the class is comming from. >
Thanks, Steve, for your tireless efforts. FYI: I am using eclipse and ran all my testcases directly from the workbench. Following your advice I tried to switch to maven for running the testcase in question, yet found it somehow difficult to get the setup right. To be more specific: I wasn't able to tell AbstractMerlinTestCase to use my local maven repo as one of its hosts. Yes, I specified a custom kernel.xml containing my maven repo as a <host> entry via "merlin.kernel", but this wouldn't work either. Could be a good idea to make the list of hosts to be used configurable. In the end, I rewrote AbstractMerlinTestCase in order to have more control. I let my testcase derive from this new base class, kicked in maven, et voila: all's well. I run the same testcase from the workbench: it fails with the usual exception, i.e. missing xinfo file. That's just not fair but goes to show that it's indeed very likely a classloader issue. Anyway, I'll stick to maven. Cheers, Olaf --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
