Hi Steve, I have had a look at the avalon-http-test.block file and reorganized the files of the demo application I am trying to deploy in Merling.
My block.xml file is as follows: <?xml version="1.0" encoding="ISO-8859-1"?> <container name="service-separated"> <classloader> <classpath> <artifact>jar:/interfaces</artifact> <artifact>jar:/random-component</artifact> <artifact>jar:/identity-component</artifact> </classpath> </classloader> <component name="hello" class="avalon.merlin.service.separated.component.hello.HelloComponent"/> <component name="randomProvider" class="avalon.merlin.service.separated.component.random.RandomGeneratorComponent"/> <component name="identityProvider" class="avalon.merlin.service.separated.component.identity.IdentifiableComponent"/> </container> This file is packaged in a jar file called hello-component.jar along with other files needed to run the component called "hello". There are other three jar files that package all the other resources that the "hello" component depends on. They are located in a directory called jar build | |__classes (contains unpackaged files) | | | |__BLOCK-INF | | |__ block.xml | | | |__avalon | | | |__merlin | |__... (the directory structure of Java packages) | |__jar (contains the packaged files) | |__ hello-component.jar (contains block.xml, avalon.merlin....HelloComponent.class and avalon.merlin....HelloComponent.xinfo) |__ interfaces.jar (contains the interfaces avalon.merlin....RandomGenerator and avalon.merlin....Identifiable) |__ random-component.jar (contains the component that implements the avalon.merlin.....RandomGenerator interface; i.e. class and xinfo files) |__ identity-component.jar (contains the component that implements the avalon.merlin.....Identifiable interface; i.e. class and xinfo files) Finally I invoke Merlin with the following command line: c:\>..../jar/melin -execute hello-component.jar The output is an error report. The report says that Merlin is unable to create a classloader for the block because it is unable to download the jar files that the block depends on. It is something like ... eliminated for clarity ... Exception: org.apache.avalon.composition.model.ModelException Message: Could not create classloader. ---- cause --------------------------------------------------------------------- Exception: org.apache.avalon.repository.RepositoryException Message: Failed to download artifact to local cache file C:\Documents and Settin gs\rjuarez\.avalon\repository\jar:\jars\interfaces.jar from hosts: http://www.dpml.net/ http://www.ibiblio.org/maven/ ---- cause --------------------------------------------------------------------- Exception: java.net.NoRouteToHostException Message: No route to host: connect ---- stack trace --------------------------------------------------------------- I understand that the connection exception is caused because I am behin a corporate firewall (this happens with Maven a lot). Now, is it possible to instruct Merlin to look for jar files referenced in the block.xml in the same directory where the hello-component.jar resides? Maybe using the -config command line option of Merlin? Do I have to change the kernel.xml file of Merlin? Regards. > -----Mensaje original----- > De: Stephen McConnell [SMTP:[EMAIL PROTECTED] > Enviado el: miércoles, 30 de junio de 2004 13:31 > Para: Avalon framework users > Asunto: Re: newbee question; how to deploy an application consisting of > several jar files in the Merlin container> > > Roberto Juarez wrote: > > > Hi everyone, > > > > I am using the Merlin container and would like to know how can I run > > an application that has several jar files in Merlin. I have tried the > > examples that come with the distribution of Merlin, in particular > > those that deal with services. I am able to run the random generator > > example by defining all components inside the same block and > > packaging all resources in one jar file. > > > > I want to separate the service provider resources in one jar file > > (random generator interface, component that implements the interface, > > type descriptors, etc...), say random.jar, and the service consumer > > resources (hello component, etc...) in another jar file, say > > hello.jar. Can this be done? > > Absolutely. > > > How? > > See attached avalon-http-test.block. This is an example of a container > that is using multiple jar files. Each jar file is declared as an > artifact in the classloader <classpath>. Each artifact reference is > resolved to a jar file in the working repository. > > Cheers, Steve. > > > -- > > |---------------------------------------| > | Magic by Merlin | > | Production by Avalon | > | | > | http://avalon.apache.org | > |---------------------------------------| <<Archivo: avalon-http-test.block>> > <<Archivo: ATT12927.txt>> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]