If you use the -debug switch you should see exactly what is being loading into the classloader. If you could post the trace I could probably provide a hint as to what the problem is.
In the current version (Metro) we have put a lot of effort into improving the protocols dealing with classloader management. Any chance you could you run a test against Metro? You would need to make some minor updates to you block definition to handle the improved classloader descriptor format. Also - which version of Merlin are you running? Cheers, Steve. > -----Original Message----- > From: ixxus nexxus [mailto:[EMAIL PROTECTED] > Sent: 02 December 2004 01:19 > To: Avalon framework users > Subject: classloaders? > > What determine which jars are searched for loading > classes? > > I have two jars: > server-api.jar and server-impl.jar > The api jar contains all the interfaces that defines > the services and impl contains the implementations. > > I tried to define my own service so I wrote a > a.b.Service interface which ends up in the > server-api.jar and a corresponding a.b.ServiceImpl in > server-impl.jar > > The implementation is written like this: > > /** > * @avalon.component version="0.1" name="Service" > lifestyle="singleton" > * @avalon.service type="a.b.Service" > * > * @version 0.1 > */ > public class ServiceImpl > extends AbstractLogEnabled > implements Initializable, Configurable, Service > { ... } > > while the interface is just > > ** > * @version 0.1 > */ > public interface Service > { ... } > > I've also got the following line in the block.xml: > > <component name="Service" class="a.b.ServiceImpl" > activation="lazy"/> > > and > > <classloader> > ... > <repository> > <resource id="xxx:server-api" > version="1.2"/> > ... > > > However, when I try to use a component that tries to > load this service, I get the exception: > > Exception: > org.apache.avalon.composition.model.ModelException > Message: Component type [a.b.ServiceImpl] contains a > reference to the class [a/b/Service] which does not > exist in the classloader. > ---- stack trace > --------------------------------------------------------------- > org.apache.avalon.composition.model.ModelException: > Component type [a.b.ServiceImpl] contains a reference > to the class [a/b/Service] which does not exist in the > classloader. > org.apache.avalon.composition.model.impl.Scanner.getComponentClass(Scann er > .java:538) > .... > > Why is that? All sorts of other services are contained > in those jar files and it seems to be able to load > those. What else do I have to do to enable it to find > my file? > > Thank you for your help. > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > 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]