avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <ep...@upstate.com>
Subject RE: Why does Block.lookup throws Exception?
Date Thu, 13 Nov 2003 20:58:23 GMT
That would be great, because I assume that Merlin will hollar if there is a
config error etc, I basically catch teh Exception and throw a
NestableRuntimeException..

Next question..

How do I get the darn mimetype component to load..


<container name="fulcrum">
   <classloader>
     <classpath>
       <repository>
         <resource id="fulcrum:fulcrum-mimetype-api" version="1.0-alpha-4"/>
         <resource id="fulcrum:fulcrum-mimetype-impl"
version="1.0-alpha-4"/>
       </repository>
     </classpath>
   </classloader>
   <component name="mimetype"
class="org.apache.fulcrum.mimetype.DefaultMimeTypeService"/>

</container>

Notice I bumped the versions, you need to build locally and deploy..   When
I do a lookup, I do this:
(MimeTypeService)merlin.lookup("fulcrum/mimetype")

I also tried
(MimeTypeService)merlin.lookup("mimetype")

Part of me feels like though that the block info included in the impl jar
should mean I don't need to declare this..  Not sure though..  Right now I
just get back a null..

I can commit the code if that helps..

Eric

> -----Original Message-----
> From: Stephen McConnell [mailto:mcconnell@apache.org]
> Sent: Thursday, November 13, 2003 9:46 PM
> To: Avalon Developers List
> Subject: Re: Why does Block.lookup throws Exception?
>
>
>
>
> Eric Pugh wrote:
>
> >Hi all,
> >
> >I am working on integrating the Merlinized Fulcrum Mimetype
> component, and
> >noticed that this throws an exception:
> >
> > Block root = m_kernel.getRootBlock();
> >        return root.locate(path);
> >
> >Why doesn't it throw a MerlinException or ComponentException?  Or
> >RuntimeException?  It seems like just Exception isn't very useful...
> >
>
> I agree.
>
> There is a NoProviderDefinitionException declared in the
> activation API.
> I think this will cover the majority of concerns.  I'll do
> some playing
> around and see what we can come up with.
>
> Stephen.
>
> >
> >Eric
> >
> >
> >---------------------------------------------------------------------
> >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
>
> |------------------------------------------------|
> | Magic by Merlin                                |
> | Production by Avalon                           |
> |                                                |
> | http://avalon.apache.org/merlin                |
> | http://dpml.net/                               |
> |------------------------------------------------|
>
>
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message