Olaf Bergner wrote:
...-----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, itshould 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.
The AMTC is already using the maven repo as the cache.
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.
Initially this is under the control of the avalon-repository bootstraper. Try adding an avalon.properties file containing the property:
avalon.repository.hosts = [a-comma-seperated-sequence-of-urls]
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.
Makes sense.
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.
For this sort of thing we really need to get an IRC channel up and running!
Anyway, I going to assume that there isn't anything here that should hold up a release.
Cheers, Steve.
Cheers,
Olaf
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
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]
