You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Neeme Praks <ne...@inpoc.com> on 2001/11/01 05:52:49 UTC

ExcaliburTestCase and Loggable components

If I configure the ExcaliburTestCase to set up the ComponenManager and some
Components for me, then ComponentManager should be setting the Logger on the
created Components as well, no?

Right now I have the following conf:
    <roles>
        <role name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor"
shorthand="xpath-processor"
default-class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"/>
        <role name="org.apache.avalon.excalibur.i18n.BundleSelector"
shorthand="bundle-selector"
default-class="org.apache.avalon.excalibur.i18n.BundleSelector"/>
    </roles>

When the ComponentManager is creating the BundleSelector component, I get an
NPE in .configure() method, because the logger is not set, .setLogger() is
not yet called.

Am I missing something or is it a bug? Probably me missing something...

Neeme


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: ExcaliburTestCase and Loggable components

Posted by Neeme Praks <ne...@one.ee>.
Nevermind, it was a bug in my code.

> -----Original Message-----
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> Sent: Wednesday, October 31, 2001 10:56 AM
> To: Avalon Developers List
> Subject: Re: ExcaliburTestCase and Loggable components
>
>
> Neeme Praks wrote:
> >
> > If I configure the ExcaliburTestCase to set up the
> ComponenManager and some
> > Components for me, then ComponentManager should be setting the
> Logger on the
> > created Components as well, no?
> >
> > Right now I have the following conf:
> >     <roles>
> >         <role
> name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor"
> > shorthand="xpath-processor"
> >
> default-class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"/>
> >         <role name="org.apache.avalon.excalibur.i18n.BundleSelector"
> > shorthand="bundle-selector"
> > default-class="org.apache.avalon.excalibur.i18n.BundleSelector"/>
> >     </roles>
> >
> > When the ComponentManager is creating the BundleSelector
> component, I get an
> > NPE in .configure() method, because the logger is not set,
> .setLogger() is
> > not yet called.
> >
> > Am I missing something or is it a bug? Probably me missing something...
>
> Hmm.  Let me check this out.  The components should be getting the Logger
> automatically....
>
> --
>
> "Those who would trade liberty for
>  temporary security deserve neither"
>                 - Benjamin Franklin
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ExcaliburTestCase and Loggable components

Posted by Berin Loritsch <bl...@apache.org>.
Neeme Praks wrote:
> 
> do I need some entries in the conf file for this?
> right now I don't have any logger configuration specified, as I need
> simple-stupid logging to console only:
> <testcase>
>     <roles>
>         <role name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor"
> shorthand="xpath-processor"
> default-class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"/>
>         <role name="org.apache.avalon.excalibur.i18n.BundleSelector"
> shorthand="bundle-selector"
> default-class="org.apache.avalon.excalibur.i18n.BundleSelector"/>
>     </roles>
> </testcase>

Is your testcase checked in?  If not, can you send me the configuration file?


> 
> > -----Original Message-----
> > From: Berin Loritsch [mailto:bloritsch@apache.org]
> > Sent: Wednesday, October 31, 2001 10:56 AM
> > To: Avalon Developers List
> > Subject: Re: ExcaliburTestCase and Loggable components
> >
> >
> > Neeme Praks wrote:
> > >
> > > If I configure the ExcaliburTestCase to set up the
> > ComponenManager and some
> > > Components for me, then ComponentManager should be setting the
> > Logger on the
> > > created Components as well, no?
> > >
> > > Right now I have the following conf:
> > >     <roles>
> > >         <role
> > name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor"
> > > shorthand="xpath-processor"
> > >
> > default-class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"/>
> > >         <role name="org.apache.avalon.excalibur.i18n.BundleSelector"
> > > shorthand="bundle-selector"
> > > default-class="org.apache.avalon.excalibur.i18n.BundleSelector"/>
> > >     </roles>
> > >
> > > When the ComponentManager is creating the BundleSelector
> > component, I get an
> > > NPE in .configure() method, because the logger is not set,
> > .setLogger() is
> > > not yet called.
> > >
> > > Am I missing something or is it a bug? Probably me missing something...
> >
> > Hmm.  Let me check this out.  The components should be getting the Logger
> > automatically....
> >
> > --
> >
> > "Those who would trade liberty for
> >  temporary security deserve neither"
> >                 - Benjamin Franklin
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 

"Those who would trade liberty for
 temporary security deserve neither"
                - Benjamin Franklin

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: ExcaliburTestCase and Loggable components

Posted by Neeme Praks <ne...@one.ee>.
do I need some entries in the conf file for this?
right now I don't have any logger configuration specified, as I need
simple-stupid logging to console only:
<testcase>
    <roles>
        <role name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor"
shorthand="xpath-processor"
default-class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"/>
        <role name="org.apache.avalon.excalibur.i18n.BundleSelector"
shorthand="bundle-selector"
default-class="org.apache.avalon.excalibur.i18n.BundleSelector"/>
    </roles>
</testcase>

> -----Original Message-----
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> Sent: Wednesday, October 31, 2001 10:56 AM
> To: Avalon Developers List
> Subject: Re: ExcaliburTestCase and Loggable components
>
>
> Neeme Praks wrote:
> >
> > If I configure the ExcaliburTestCase to set up the
> ComponenManager and some
> > Components for me, then ComponentManager should be setting the
> Logger on the
> > created Components as well, no?
> >
> > Right now I have the following conf:
> >     <roles>
> >         <role
> name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor"
> > shorthand="xpath-processor"
> >
> default-class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"/>
> >         <role name="org.apache.avalon.excalibur.i18n.BundleSelector"
> > shorthand="bundle-selector"
> > default-class="org.apache.avalon.excalibur.i18n.BundleSelector"/>
> >     </roles>
> >
> > When the ComponentManager is creating the BundleSelector
> component, I get an
> > NPE in .configure() method, because the logger is not set,
> .setLogger() is
> > not yet called.
> >
> > Am I missing something or is it a bug? Probably me missing something...
>
> Hmm.  Let me check this out.  The components should be getting the Logger
> automatically....
>
> --
>
> "Those who would trade liberty for
>  temporary security deserve neither"
>                 - Benjamin Franklin
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ExcaliburTestCase and Loggable components

Posted by Berin Loritsch <bl...@apache.org>.
Neeme Praks wrote:
> 
> If I configure the ExcaliburTestCase to set up the ComponenManager and some
> Components for me, then ComponentManager should be setting the Logger on the
> created Components as well, no?
> 
> Right now I have the following conf:
>     <roles>
>         <role name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor"
> shorthand="xpath-processor"
> default-class="org.apache.avalon.excalibur.xml.xpath.XPathProcessorImpl"/>
>         <role name="org.apache.avalon.excalibur.i18n.BundleSelector"
> shorthand="bundle-selector"
> default-class="org.apache.avalon.excalibur.i18n.BundleSelector"/>
>     </roles>
> 
> When the ComponentManager is creating the BundleSelector component, I get an
> NPE in .configure() method, because the logger is not set, .setLogger() is
> not yet called.
> 
> Am I missing something or is it a bug? Probably me missing something...

Hmm.  Let me check this out.  The components should be getting the Logger
automatically....

-- 

"Those who would trade liberty for
 temporary security deserve neither"
                - Benjamin Franklin

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>