Hi,

(anyone with any ideas about this...thanks in advance) /regards Peter

I'm having trouble getting a container to classload an artifact (a jar file) needed by a component declared within the container directive, se my kernel.xml snippet below. The "hello" component impl.class is in the cappuccino-1.0.0.jar and is internally using the class org.apache.avalon.framework.logger.Logger. Thus the dependcy to the avalon-framework-api-4.2.0.jar

If I remove all reference to the Logger in the java source for the HelloComponent everything is working properly, with a full lifecycle run by the merlin kernel, but trying to use the Logger it fails.

The avalon-framework-api-4.2.0.jar file is located in the local maven repository, the directory /home/petje/.maven/repository/avalon-framework/jars
I also tried using the fileset directive with this directory explicitly set with the same malfunctional result.


<?xml version="1.0" encoding="ISO-8859-1"?>
<kernel>

<repository>
  <hosts>
    <host path="http://www.dpml.net/"/>
    <host path="http://www.ibiblio.org/maven/"/>
  </hosts>
</repository>

<container name="gonzo">
<classloader>
<classpath>
<fileset dir="/home/petje/cappuccino/target">
<include name="cappuccino-1.0.0.jar" />
</fileset>
<repository>
<resource id="avalon-framework:avalon-framework-api" version="4.2.0"/>
</repository>
</classpath>
</classloader>


<component name="hello" class="com.euronetics.cappuccino.HelloComponent"/>

</container>

</kernel>



This is the debug log...(look for the [WARN] statement)

[DEBUG ] (kernel.logger): logging system established
[DEBUG ] (kernel.logger): adding category [kernel]
[DEBUG ] (kernel): logging system established
[DEBUG ] (kernel): repository established: /home/petje/.maven/repository, http://www.dpml.net/, http://www.ibiblio.org/maven/
[DEBUG ] (kernel.logger): adding category [kernel]
[INFO ] (kernel): info report
-----------------------------------------------------------
Merlin Kernel Environment Listing
-----------------------------------------------------------


${user.dir} == /home/petje/bin
${user.home} == /home/petje

${avalon.repository.cache} == /home/petje/merlin/system
${avalon.repository.online} == true
${avalon.repository.hosts} == http://www.dpml.net,http://www.ibiblio.org/maven


${merlin.lang} == null
${merlin.home} == /home/petje/merlin
${merlin.system} == /home/petje/merlin/system
${merlin.config} == /home/petje/merlin/config
${merlin.kernel} == file:/home/petje/merlin/config/kernel.xml
${merlin.logging.implementation} == artifact:avalon-logging/avalon-logkit-impl#1.0-SNAPSHOT
${merlin.logging.config} == null
${merlin.runtime} == artifact:avalon-activation/avalon-activation-impl#2.0-SNAPSHOT
${merlin.override} == null
${merlin.dir} == /home/petje/bin
${merlin.temp} == /tmp
${merlin.context} == /home/petje/bin/home
${merlin.anchor} == /home/petje/bin
${merlin.info} == true
${merlin.debug} == true
${merlin.audit} == false
${merlin.server} == false
${merlin.autostart} == true
${merlin.code.security.enabled} == false
${merlin.deployment.timeout} == 1000
${merlin.repository} == /home/petje/.maven/repository
${merlin.repository.hosts} == http://www.dpml.net/,http://www.ibiblio.org/maven/
${merlin.deployment} ==


-----------------------------------------------------------
[INFO ] (kernel): building application model
[DEBUG ] (kernel.logger): adding root category
[DEBUG ] (kernel.logger): adding root category
[DEBUG ] (kernel.logger): adding root category
[DEBUG ] (classloader): base: ${user.dir}
[DEBUG ] (): included entries: 1
[DEBUG ] (): repository declarations: 1
[DEBUG ] (): repository 0 contains 1 entries.
[DEBUG ] (classloader): classpath: file:/home/petje/cappuccino/target/cappuccino-1.0.0.jar;file:/home/petje/.maven/repository/avalon-framework/jars/avalon-framework-api-4.2.0.jar


[DEBUG ] (classloader.scanner): scanning: file:/home/petje/cappuccino/target/cappuccino-1.0.0.jar
[WARN ] (classloader.scanner): Ignoring component type [com.euronetics.cappuccino.HelloComponent] as the implementation class contains a reference to the class [org/apache/avalon/framework/logger/Logger] which does not exist in the classloader.
[DEBUG ] (classloader.scanner): scanning: file:/home/petje/.maven/repository/avalon-framework/jars/avalon-framework-api-4.2.0.jar


[DEBUG ] (classloader.types): type install count: 0
[DEBUG ] (kernel.logger): adding root category
[DEBUG ] (kernel.logger): adding category [hello]
Exception in thread "main" org.apache.avalon.composition.model.ModelException: Unable to construct a new containment model: gonzo.
at org.apache.avalon.composition.model.impl.DefaultModelFactory.createRootContainmentModel(DefaultModelFactory.java:298)


at org.apache.avalon.merlin.impl.DefaultFactory.createApplicationModel(DefaultFactory.java:479)

at org.apache.avalon.merlin.impl.DefaultFactory.create(DefaultFactory.java:245)

at com.euronetics.cappuccino.Cappuccino.main(Cappuccino.java:81)
Caused by: org.apache.avalon.composition.model.ModelException: Unable to create a nested deployment model: hello in the containment model /.
at org.apache.avalon.composition.model.impl.DefaultContainmentModelComponentHelper.createComponentContext(DefaultContainmentModelComponentHelper.java:150)


at org.apache.avalon.composition.model.impl.DefaultContainmentModel.createComponentModel(DefaultContainmentModel.java:900)

at org.apache.avalon.composition.model.impl.DefaultContainmentModel.createDeploymentModel(DefaultContainmentModel.java:646)

at org.apache.avalon.composition.model.impl.DefaultContainmentModel.addModel(DefaultContainmentModel.java:605)

at org.apache.avalon.composition.model.impl.DefaultContainmentModel.<init>(DefaultContainmentModel.java:183)

at org.apache.avalon.composition.model.impl.DefaultModelFactory.createContainmentModel(DefaultModelFactory.java:330)

at org.apache.avalon.composition.model.impl.DefaultModelFactory.createRootContainmentModel(DefaultModelFactory.java:289)

... 3 more
Caused by: org.apache.avalon.composition.model.TypeUnknownException: Unable to locate a component type descriptor for the component class [com.euronetics.cappuccino.HelloComponent] in the classloader. Please verify that the component classname is correct and that a component type descriptor is included in a jar file available within the container classloader.
at org.apache.avalon.composition.model.impl.DefaultTypeRepository.getType(DefaultTypeRepository.java:248)


at org.apache.avalon.composition.model.impl.DefaultTypeRepository.getType(DefaultTypeRepository.java:213)

at org.apache.avalon.composition.model.impl.DefaultContainmentModelComponentHelper.createComponentContext(DefaultContainmentModelComponentHelper.java:125)

      ... 9 more



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to