Eike Stepper wrote:

hi stephen,

the "bin/BLOCK-INF/block.xml" looks like:

<container name='econ'>

   <classloader>
     <classpath>
       <repository>
         <resource id="avalon-framework:avalon-framework-impl" version="4.1.5"/>
       </repository>
     </classpath>
   </classloader>

   <component name='hello' class='tutorial.impl.HelloComponent'/>

</container>


The above definition looks like a block.xml file that was packaged inside a jar file (in which case the enclosing jar is implicitly included in the classpath). In you scenario your referencing the block as a stand-alone definition in which case you need to include a jar file that contains the HelloComponent class in the <classpath> declaration and make sure the corresponding jar is put into your repository.

So assuming that the jar file containing HelloComponent is named
hello-1.0.jar - you can put this into you repository under a group (e.g.
tutorials), then reference it in your classloader definition:

    <classloader>
      <classpath>
        <repository>
          <resource id="tutorials:hello" version="1.0"/>
        </repository>
      </classpath>
    </classloader>

Without the above, the classloader associated with the container you
have created will not have the HelloComponent class in scope and as a
result you get the following error:

  Caused by: org.apache.avalon.composition.model.TypeUnknownException:
  Unable to locate a component type descriptor for the component
  class [tutorial.impl.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.

Cheers, Stephen.

--

|---------------------------------------|
| Magic by Merlin                       |
| Production by Avalon                  |
|                                       |
| http://avalon.apache.org              |
|---------------------------------------|



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



Reply via email to