Well, I've now come up with this block.xml:

<container name="hello">

   <classloader>
     <classpath>
       <repository>
         <resource id="avalon-framework:avalon-framework-impl"
version="4.1.5"/>
       </repository>
       <fileset
dir="/home_local/jpermar/midcvs/perseus/output/classes">
         <include name="**/*.class"/>
       </fileset>
     </classpath>
   </classloader>

   <component name="hello"
class="edu.mit.ll.perseus.hello.HelloComponent"/>

</container>

But now I'm still getting the ClassNotFoundException:
------cause---------------------------------
Exception: java.lang.ClassNotFoundException
Message: edu.mit.ll.perseus.hello.HelloComponent

How can I turn on the merlin debug? I'm sure the directory in
the block.xml is correct, and I'm sure the class is there, but
merlin still isn't finding it (just want to see what the
classloader classpath is at run-time).

Justin

---- Original message ----
>Date: Mon, 03 May 2004 20:16:48 +0200
>From: Stephen McConnell <[EMAIL PROTECTED]>  
>Subject: Re: running hello component  
>To: Avalon framework users <[EMAIL PROTECTED]>
>
>Justin Permar wrote:
>
>> OK, I can tell I'm very close now. Last thing.. how do I defin
>> e the initial classpath? I set the CLASSPATH environment
>> variable, but merlin seems not to use it...
>> 
>> I need to just find the HelloComponent.class reference in
>> block.xml
>
>Two options ...
>
>   (a) bundle
>   (b) go independent
>
>To bundle means that you include a block definitions (the xml
file 
>containing your container definition) in the jar file you
generate under 
>the path /BLOCK-INF/block.xml.  Then if you run merlin a
provide the jar 
>file as an argument then merlin will look into the jar, find
the block 
>and deploy it and add the jar to the blocks classloader
implicitly.
>
>The other option is to go independent - ie. to provide merlin
with a 
>pure block definition (the xml file containing the container
spec).  In 
>this case the <container>'s <classloader>'s <classpath> needs
to include 
>the jar file you have created - and the jar file needs to
exist in 
>either the local cache or a remote repository.
>
>Cheers, Steve.
>
>
>> Justin
>> 
>> 
>> 
>> ---- Original message ----
>> 
>>>Date: Mon, 03 May 2004 19:48:02 +0200
>>>From: Stephen McConnell <[EMAIL PROTECTED]>  
>>>Subject: Re: running hello component  
>>>To: Avalon framework users <[EMAIL PROTECTED]>
>>>
>>>Justin Permar wrote:
>>>
>>>
>>>>That doesn't work for us. No internet access.
>>>>
>>>>I've actually removed the <host> references from both
>>>>kernel.xml and debug.xml.
>>>>
>>>>What I need of course then is a local repository. So.. back to
>>>>my original question: what do I make to specify this artifact,
>>>>and the jars related to the artifact? I'm assuming there's a
>>>>file in ibiblio.org that I can just get and place locally?
>>>>Then I can just add that location to kernel.xml as a file
>>>>reference:
>>>>
>>>><host path="file:///my/local/repository/directory"/>
>>>>
>>>>Does that sound right?
>>>
>>>That perfectly reasonable.
>>>
>>>What your defining is a remote repository that happens to be
>> 
>> hosted on 
>> 
>>>your local file system.  Assuming that your local repository
>> 
>> has the 
>> 
>>>resource in [repo]/[group]/jars/[artifact-name][-[version]]
>> 
>> then your 
>> 
>>>cooking on gas.
>>>
>>>Cheers, Stephen.
>>>
>>>
>>>
>>>>Justin
>>>>
>>>>
>>>>
>>>>---- Original message ----
>>>>
>>>>
>>>>>Date: Tue, 4 May 2004 00:39:28 +0800
>>>>>From: Niclas Hedhman <[EMAIL PROTECTED]>  
>>>>>Subject: Re: running hello component  
>>>>>To: "Avalon framework users" <[EMAIL PROTECTED]>
>>>>>
>>>>>On Tuesday 04 May 2004 00:20, Justin Permar wrote:
>>>>>
>>>>>
>>>>>
>>>>>>        <resource
id="avalon-framework:avalon-framework-impl"
>>>>>>version="4.1.5"/>
>>>>>
>>>>>This is part of Merlin's internals (I think), but even if it
>>>>
>>>>wasn't, Merlin 
>>>>
>>>>
>>>>>will download it on-demand from a central repository.
>>>>>So, for your own components, you can either define your Jars
>>>>
>>>>directly (not 
>>>>
>>>>
>>>>>strongly recommended) or use a central repository, where
>>>>
>>>>things are picked up 
>>>>
>>>>
>>>>>on demand. Also, while developing and using Maven, if you
>>>>
>>>>call the 
>>>>
>>>>
>>>>>jar:install goal, the JAR will be copied to the local
>>>>
>>>>repository on your 
>>>>
>>>>
>>>>>computer, and be used between projects.
>>>>>
>>>>>
>>>>>
>>>>>>I know that's not complete, though, because I don't specify
>>>>>>anything about resource
avalon-framework:avalon-framework-impl
>>>>>>which I need to run my component.
>>>>>
>>>>>Translation happens so that the above becomes;
>>>>>  avalon-framework/jars/avalon-framework-impl-4.1.5.jar
>>>>>And is looked up, first in the local repository, and then in
>>>>
>>>>each central 
>>>>
>>>>
>>>>>repository that has been defined, for instance
>>>>>http://www.ibiblio.org/maven/avalon-framework/jars/avalon-framework-impl-4.1.5.jar
>>>>>
>>>>>You can even bootstrap Merlin itself from the command-line
>>>>
>>>>over the net, by 
>>>>
>>>>
>>>>>the same underlying mechanism... (I explain that elsewhere).
>>>>>
>>>>>Anything else that is unclear?
>>>>>
>>>>>-- 
>>>>>+---------//-------------------+
>>>>>|   http://www.bali.ac         |
>>>>>|  http://niclas.hedhman.org   |
>>>>>+------//----------------------+
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>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]
>>>>
>>>>
>>>
>>>
>>>-- 
>>>
>>>|---------------------------------------|
>>>| Magic by Merlin                       |
>>>| Production by Avalon                  |
>>>|                                       |
>>>| http://avalon.apache.org              |
>>>|---------------------------------------|
>>>
>>>
>>>---------------------------------------------------------------------
>>>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]
>> 
>> 
>
>
>-- 
>
>|---------------------------------------|
>| Magic by Merlin                       |
>| Production by Avalon                  |
>|                                       |
>| http://avalon.apache.org              |
>|---------------------------------------|
>
>
>---------------------------------------------------------------------
>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]

Reply via email to