Also, I am currently loading a block with a container called 'tutorial' which was the easist way to load the Appliance for this: appliance:/tutorial/hello...
However, what I think should be happening is that the block.xml in merlin-hello-tutorial.jar should be auto imported under the name 'tutorial/hello' while the block for turbine should have a container called 'turbine' so any thing would be defined as 'turbine/mimetype'. I looked, and the block for fulcrum-mimetype-impl-1.0-alpha-4.jar (mouthful!) has a container called 'test' which I think is wrong.. The mimetype code for fulcrum based on what you did is all checked in by the way.. Eric > -----Original Message----- > From: Stephen McConnell [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 13, 2003 10:26 PM > To: Avalon Developers List > Subject: Re: Why does Block.lookup throws Exception? > > > > > Eric Pugh wrote: > > >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. > > > > Yep - asssumption is correct. > > > > >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") > > > > Don't have the code in front of me just at the moment but you > should be > using "/fulcrum/mimetype" (i.e. an absolute path). Remember > that your > invoking this from the root container - unlike the testcase where you > can conviniently use a relative reference to the test container. > > > > >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.. > > > > You don't need to do this. If the <component> is declared > Merlin will > default to activating component on container deployment. > > >Not sure though.. Right now I > >just get back a null.. > > > > That's not good. You should actually be getting an > IlegalArgumentException. > > > > >I can commit the code if that helps.. > > > > Yep - what's the directory path that your committing to? > > Stephen. > > > > >Eric > > > > > > > >>-----Original Message----- > >>From: Stephen McConnell [mailto:[EMAIL PROTECTED] > >>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: [EMAIL PROTECTED] > >>>For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >>> > >>> > >>> > >>> > >>-- > >> > >>Stephen J. McConnell > >>mailto:[EMAIL PROTECTED] > >> > >>|------------------------------------------------| > >>| Magic by Merlin | > >>| Production by Avalon | > >>| | > >>| http://avalon.apache.org/merlin | > >>| http://dpml.net/ | > >>|------------------------------------------------| > >> > >> > >> > >> > >> > >>------------------------------------------------------------ > --------- > >>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] > > > > > > > > > > -- > > Stephen J. McConnell > mailto:[EMAIL PROTECTED] > > |------------------------------------------------| > | Magic by Merlin | > | Production by Avalon | > | | > | http://avalon.apache.org/merlin | > | http://dpml.net/ | > |------------------------------------------------| > > > > > > --------------------------------------------------------------------- > 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]
