You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Jim Alateras <ji...@comware.com.au> on 2003/11/10 11:15:06 UTC

[merlin] using include directive in block.xml

Hi,

I am  trying to configure a composite component to include the thread
pool block using the 'include' directive in my block.xml, which is shown
below

<container name="pep">
     <classloader>
       <classpath>
         <repository>
           <!-- Avalon resources -->
           <resource id="avalon-framework:avalon-framework-api"
version="4.1.5"/>
           <resource id="avalon-framework:avalon-framework-impl"
version="4.1.5"/>
           <resource id="commons-logging:commons-logging"
version="1.0.3"/>

           <!-- ChoreoWorks Server Application Platform -->
           <resource id="choreoworks-sap:sap-logger" version="1.0"/>
           <resource id="choreoworks-sap:sap-uuid-spi" version="1.0"/>
           <resource id="choreoworks-sap:sap-uuid-tyrex" version="1.0"/>
           <resource id="choreoworks-sap:sap-scheduler-spi"
version="1.0"/>
           <resource id="choreoworks-sap:sap-scheduler-quartz"
version="1.0"/>
           <resource id="choreoworks-sap:sap-queue-spi" version="1.0"/>
           <resource id="choreoworks-sap:sap-queue-openjms"
version="1.0"/>

           <!-- Logger Components -->
           <resource id="log4j:log4j" version="1.2.8"/>

           <!-- Job Scheduler Component -->
           <resource id="quartz:quartz" version="1.2.3"/>

           <!-- Cornerstone Components -->
           <resource id="cornerstone-threads:cornerstone-threads-api"
version="1.0"/>
           <resource id="cornerstone-threads:cornerstone-threads-impl"
version="1.0"/>

           <!-- Excalibur Components -->
           <resource id="excalibur-thread:excalibur-thread"
version="1.1.1"/>
           
           <!-- JMS Components -->
           <resource id="jndi:jndi" version="1.2.1"/>
           <resource id="jms:jms" version="1.0.2a"/>
           <resource id="openjms:openjms-client" version="0.7.6-rc2"/>
           <resource id="openjms:exolabcore" version="0.3.6"/>
         </repository>
       </classpath>
     </classloader>


     <include name="thread-manager"
id="cornerstone-threads:cornerstone-threads-impl" version="1.0" />

     <component name="log4j-logger"
class="com.choreoworks.sap.logger.log4j.Log4JLogger"
activation="startup"/>
     <component name="tyrex-uuid"
class="com.choreoworks.sap.uuid.tyrex.TyrexUUIDGenerator"
activation="startup"/>
     <component name="quartz-scheduler"
class="com.choreoworks.sap.scheduler.quartz.QuartzJobScheduler"
activation="startup"/>
     <component name="openjms-queue"
class="com.choreoworks.sap.queue.openjms.OpenJMSQueueManager"
activation="startup"/>
     
     <component name="version"
class="com.choreoworks.pep.loader.PlatformVersion"
activation="startup"/>
     <component name="pep-loader"
class="com.choreoworks.pep.loader.PEPLoader" activation="startup" />
</container>


When I attempt to run the composite block I get the following error.


Internal error during kernel instantiation.


---- report -------------------------------------------------------

Exception: org.apache.avalon.merlin.kernel.KernelException
Message: Block install failure:
file:/C:/applications/merlin/repository/choreoworks-pep/jars/pep-loader-
0.1.jar

Cause: org.apache.avalon.composition.model.ModelException
Message: Unable to create block from embedded descriptor
[jar:file:/C:/applications/merlin/repository/choreoworks-pep/jars/pep-lo
ade
r-0.1.jar!/BLOCK-INF/block.xml] in the containmment model [/] due to a
build related error.

Cause: org.apache.avalon.composition.model.ModelException
Message: Unable to create block from embedded descriptor
[jar:file:/c:/applications/merlin/repository/cornerstone-threads/jars/co
rne
rstone-threads-impl-1.0.jar!/BLOCK-INF/block.xml] in the containmment
model [/pep] due to a build related error.

Cause: org.apache.avalon.composition.model.ModelException
Message: Unable to create a nested deployment model: manager in the
containment model /pep/.

Cause: org.apache.avalon.composition.model.TypeUnknownException
Message: Unable to locate a component type descriptor for the component
class [org.apache.avalon.cornerstone.blocks.threads.DefaultT
hreadManager] in the classloader.  Please verify that the component
classname is correct and that a component type descriptor is inc
luded in a jar file available within the container classloader.

-------------------------------------------------------------------

I had a look at the tutorial and I cannot see what I am doing wrong.


Cheers
</jima>

BTW I am using Merlin v3.0


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: [merlin] using include directive in block.xml

Posted by Stephen McConnell <mc...@apache.org>.

Jim Alateras wrote:

>Just for completeness I have attached a copy of the block.xml that works
>correctly. I would have thought that thread-impl's block.xml would have
>included all the runtime dependencies for the DefaultThreadManager.
>

I would have though so as well. 
I'm going to doing some digging.

Cheers, Steve.

>
>
>cheers
></jima>
>  
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: embedding tomcat in merlin

Posted by Stephen McConnell <mc...@apache.org>.

Stephen McConnell wrote:

> Actually I'm working on this at the moment.
> Is 4.2.14 the good jetty version? 


Ignore this question - I've just read the readme which confirms we are 
running against 4.2.14.

Steve.

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: embedding tomcat in merlin

Posted by Stephen McConnell <mc...@apache.org>.

Timothy Bennett wrote:

>"Jim Alateras" <ji...@comware.com.au> wrote in message
>news:008b01c3a780$9d1c83d0$6780a8c0@VENUS...
>
>  
>
>>Can someone confirm whether the servak component, in avalon-sandbox, can
>>be used to embed tomcat into a merlin container.
>>    
>>
>
>Jim,
>
>If you're looking for a web server/servlet container that can embedded into
>merlin, then the avalon-merlin block has just been offered up as candidate
>for the sandbox.  It is a solid block implementation of the Jetty web server
>and servlet container (http://www.mortbay.org), and provides a hook to allow
>any servlets/webapps access to the Avalon ServiceManager for component
>lookup.  There should be an announcement here and on the avalon users list
>soon about its availability.
>

Actually I'm working on this at the moment.
Is 4.2.14 the good jetty version?

Stephen.

>
>If you are absolutely set on using Tomcat, then this block will not be of
>much interest to you.
>
>Timothy
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>
>
>  
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: embedding tomcat in merlin

Posted by Jim Alateras <ji...@comware.com.au>.
Tim,

Just tried it and works well.

thanks
</jima>

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Timothy Bennett
> Sent: Tuesday, November 11, 2003 1:54 AM
> To: dev@avalon.apache.org
> Subject: Re: embedding tomcat in merlin
> 
> "Jim Alateras" <ji...@comware.com.au> wrote in message
> news:008b01c3a780$9d1c83d0$6780a8c0@VENUS...
> 
> > Can someone confirm whether the servak component, in avalon-sandbox,
can
> > be used to embed tomcat into a merlin container.
> 
> Jim,
> 
> If you're looking for a web server/servlet container that can embedded
> into
> merlin, then the avalon-merlin block has just been offered up as
candidate
> for the sandbox.  It is a solid block implementation of the Jetty web
> server
> and servlet container (http://www.mortbay.org), and provides a hook to
> allow
> any servlets/webapps access to the Avalon ServiceManager for component
> lookup.  There should be an announcement here and on the avalon users
list
> soon about its availability.
> 
> If you are absolutely set on using Tomcat, then this block will not be
of
> much interest to you.
> 
> Timothy
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: embedding tomcat in merlin

Posted by Timothy Bennett <ex...@comcast.net>.
"Jim Alateras" <ji...@comware.com.au> wrote in message
news:008b01c3a780$9d1c83d0$6780a8c0@VENUS...

> Can someone confirm whether the servak component, in avalon-sandbox, can
> be used to embed tomcat into a merlin container.

Jim,

If you're looking for a web server/servlet container that can embedded into
merlin, then the avalon-merlin block has just been offered up as candidate
for the sandbox.  It is a solid block implementation of the Jetty web server
and servlet container (http://www.mortbay.org), and provides a hook to allow
any servlets/webapps access to the Avalon ServiceManager for component
lookup.  There should be an announcement here and on the avalon users list
soon about its availability.

If you are absolutely set on using Tomcat, then this block will not be of
much interest to you.

Timothy




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: embedding tomcat in merlin

Posted by Stephen McConnell <mc...@apache.org>.

Jim Alateras wrote:

>Can someone confirm whether the servak component, in avalon-sandbox, can
>be used to embed tomcat into a merlin container.
>

I can be - I remember posting an example once - but it was nothing more 
than a validation that is was possible.

Stephen.


>
>cheers
></jima>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>
>
>  
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


embedding tomcat in merlin

Posted by Jim Alateras <ji...@comware.com.au>.
Can someone confirm whether the servak component, in avalon-sandbox, can
be used to embed tomcat into a merlin container.

cheers
</jima>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [merlin] using include directive in block.xml

Posted by Jim Alateras <ji...@comware.com.au>.
Oops wrong block.xml. Here is the one I ended up using

> -----Original Message-----
> From: Jim Alateras [mailto:jima@comware.com.au]
> Sent: Monday, November 10, 2003 10:26 PM
> To: 'Avalon Developers List'
> Subject: RE: [merlin] using include directive in block.xml
> 
> Just for completeness I have attached a copy of the block.xml that
works
> correctly. I would have thought that thread-impl's block.xml would
have
> included all the runtime dependencies for the DefaultThreadManager.
> 
> cheers
> </jima>
> 
> > -----Original Message-----
> > From: Jim Alateras [mailto:jima@comware.com.au]
> > Sent: Monday, November 10, 2003 10:18 PM
> > To: 'Avalon Developers List'
> > Subject: RE: [merlin] using include directive in block.xml
> >
> > Steve,
> >
> > I see my problem it looks like I need to include excalibur-pool.
> >
> > cheers
> > </jima>
> >
> > > -----Original Message-----
> > > From: Jim Alateras [mailto:jima@comware.com.au]
> > > Sent: Monday, November 10, 2003 9:57 PM
> > > To: 'Avalon Developers List'
> > > Subject: RE: [merlin] using include directive in block.xml
> > >
> > > >
> > > >
> > > > Could you post the log using -debug
> > >
> > > attached
> > >
> > > >
> > > > Quick question - do you really need cornerstone-threads-impl and
> > > > excaliobur-thread in your classloader?
> > > >
> > >
> > > you're right I do not need them.
> > >
> > >
> > > cheers
> > > </jima>
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> > For additional commands, e-mail: dev-help@avalon.apache.org

RE: [merlin] using include directive in block.xml

Posted by Jim Alateras <ji...@comware.com.au>.
Just for completeness I have attached a copy of the block.xml that works
correctly. I would have thought that thread-impl's block.xml would have
included all the runtime dependencies for the DefaultThreadManager.

cheers
</jima>

> -----Original Message-----
> From: Jim Alateras [mailto:jima@comware.com.au]
> Sent: Monday, November 10, 2003 10:18 PM
> To: 'Avalon Developers List'
> Subject: RE: [merlin] using include directive in block.xml
> 
> Steve,
> 
> I see my problem it looks like I need to include excalibur-pool.
> 
> cheers
> </jima>
> 
> > -----Original Message-----
> > From: Jim Alateras [mailto:jima@comware.com.au]
> > Sent: Monday, November 10, 2003 9:57 PM
> > To: 'Avalon Developers List'
> > Subject: RE: [merlin] using include directive in block.xml
> >
> > >
> > >
> > > Could you post the log using -debug
> >
> > attached
> >
> > >
> > > Quick question - do you really need cornerstone-threads-impl and
> > > excaliobur-thread in your classloader?
> > >
> >
> > you're right I do not need them.
> >
> >
> > cheers
> > </jima>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org

RE: [merlin] using include directive in block.xml

Posted by Jim Alateras <ji...@comware.com.au>.
Steve,

I see my problem it looks like I need to include excalibur-pool. 

cheers
</jima>

> -----Original Message-----
> From: Jim Alateras [mailto:jima@comware.com.au]
> Sent: Monday, November 10, 2003 9:57 PM
> To: 'Avalon Developers List'
> Subject: RE: [merlin] using include directive in block.xml
> 
> >
> >
> > Could you post the log using -debug
> 
> attached
> 
> >
> > Quick question - do you really need cornerstone-threads-impl and
> > excaliobur-thread in your classloader?
> >
> 
> you're right I do not need them.
> 
> 
> cheers
> </jima>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


RE: [merlin] using include directive in block.xml

Posted by Jim Alateras <ji...@comware.com.au>.
> 
> 
> Could you post the log using -debug

attached

> 
> Quick question - do you really need cornerstone-threads-impl and
> excaliobur-thread in your classloader?
> 

you're right I do not need them.


cheers
</jima>

Re: [merlin] using include directive in block.xml

Posted by Stephen McConnell <mc...@apache.org>.
Could you post the log using -debug.

Quick question - do you really need cornerstone-threads-impl and 
excaliobur-thread in your classloader?

Cheers, Steve.


Jim Alateras wrote:

>Hi,
>
>I am  trying to configure a composite component to include the thread
>pool block using the 'include' directive in my block.xml, which is shown
>below
>
><container name="pep">
>     <classloader>
>       <classpath>
>         <repository>
>           <!-- Avalon resources -->
>           <resource id="avalon-framework:avalon-framework-api"
>version="4.1.5"/>
>           <resource id="avalon-framework:avalon-framework-impl"
>version="4.1.5"/>
>           <resource id="commons-logging:commons-logging"
>version="1.0.3"/>
>
>           <!-- ChoreoWorks Server Application Platform -->
>           <resource id="choreoworks-sap:sap-logger" version="1.0"/>
>           <resource id="choreoworks-sap:sap-uuid-spi" version="1.0"/>
>           <resource id="choreoworks-sap:sap-uuid-tyrex" version="1.0"/>
>           <resource id="choreoworks-sap:sap-scheduler-spi"
>version="1.0"/>
>           <resource id="choreoworks-sap:sap-scheduler-quartz"
>version="1.0"/>
>           <resource id="choreoworks-sap:sap-queue-spi" version="1.0"/>
>           <resource id="choreoworks-sap:sap-queue-openjms"
>version="1.0"/>
>
>           <!-- Logger Components -->
>           <resource id="log4j:log4j" version="1.2.8"/>
>
>           <!-- Job Scheduler Component -->
>           <resource id="quartz:quartz" version="1.2.3"/>
>
>           <!-- Cornerstone Components -->
>           <resource id="cornerstone-threads:cornerstone-threads-api"
>version="1.0"/>
>           <resource id="cornerstone-threads:cornerstone-threads-impl"
>version="1.0"/>
>
>           <!-- Excalibur Components -->
>           <resource id="excalibur-thread:excalibur-thread"
>version="1.1.1"/>
>           
>           <!-- JMS Components -->
>           <resource id="jndi:jndi" version="1.2.1"/>
>           <resource id="jms:jms" version="1.0.2a"/>
>           <resource id="openjms:openjms-client" version="0.7.6-rc2"/>
>           <resource id="openjms:exolabcore" version="0.3.6"/>
>         </repository>
>       </classpath>
>     </classloader>
>
>
>     <include name="thread-manager"
>id="cornerstone-threads:cornerstone-threads-impl" version="1.0" />
>
>     <component name="log4j-logger"
>class="com.choreoworks.sap.logger.log4j.Log4JLogger"
>activation="startup"/>
>     <component name="tyrex-uuid"
>class="com.choreoworks.sap.uuid.tyrex.TyrexUUIDGenerator"
>activation="startup"/>
>     <component name="quartz-scheduler"
>class="com.choreoworks.sap.scheduler.quartz.QuartzJobScheduler"
>activation="startup"/>
>     <component name="openjms-queue"
>class="com.choreoworks.sap.queue.openjms.OpenJMSQueueManager"
>activation="startup"/>
>     
>     <component name="version"
>class="com.choreoworks.pep.loader.PlatformVersion"
>activation="startup"/>
>     <component name="pep-loader"
>class="com.choreoworks.pep.loader.PEPLoader" activation="startup" />
></container>
>
>
>When I attempt to run the composite block I get the following error.
>
>
>Internal error during kernel instantiation.
>
>
>---- report -------------------------------------------------------
>
>Exception: org.apache.avalon.merlin.kernel.KernelException
>Message: Block install failure:
>file:/C:/applications/merlin/repository/choreoworks-pep/jars/pep-loader-
>0.1.jar
>
>Cause: org.apache.avalon.composition.model.ModelException
>Message: Unable to create block from embedded descriptor
>[jar:file:/C:/applications/merlin/repository/choreoworks-pep/jars/pep-lo
>ade
>r-0.1.jar!/BLOCK-INF/block.xml] in the containmment model [/] due to a
>build related error.
>
>Cause: org.apache.avalon.composition.model.ModelException
>Message: Unable to create block from embedded descriptor
>[jar:file:/c:/applications/merlin/repository/cornerstone-threads/jars/co
>rne
>rstone-threads-impl-1.0.jar!/BLOCK-INF/block.xml] in the containmment
>model [/pep] due to a build related error.
>
>Cause: org.apache.avalon.composition.model.ModelException
>Message: Unable to create a nested deployment model: manager in the
>containment model /pep/.
>
>Cause: org.apache.avalon.composition.model.TypeUnknownException
>Message: Unable to locate a component type descriptor for the component
>class [org.apache.avalon.cornerstone.blocks.threads.DefaultT
>hreadManager] in the classloader.  Please verify that the component
>classname is correct and that a component type descriptor is inc
>luded in a jar file available within the container classloader.
>
>-------------------------------------------------------------------
>
>I had a look at the tutorial and I cannot see what I am doing wrong.
>
>
>Cheers
></jima>
>
>BTW I am using Merlin v3.0
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>
>
>  
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org