You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by JP...@apex.soft.net on 2002/04/07 16:46:58 UTC

Log4j error

Hi,

I followed the instructions given in the "how_to_config.html" but still the
Log4j Errors persists.
[log4j:ERROR No appenders could be found for category]
[log4j:ERROR Please initialize the log4j system properly]

can somebody pls  sent me  Log4j property files from the working
environments so that I could cross check the same here.

thnks
JP..



                                                                                            
                    "Vincent                                                                
                    Massol"              To:     "'Cactus Users List'"                      
                    <vmassol@octo.        <ca...@jakarta.apache.org>                  
                    com>                 cc:                                                
                                         Subject:     RE: Advice needed                     
                    05/04/2002                                                              
                    02:48 AM                                                                
                    Please respond                                                          
                    to "Cactus                                                              
                    Users List"                                                             
                                                                                            
                                                                                            




Hi,

You're probably using Cactus 1.2. In Cactus 1.3 this would not happen as
a root category is defined for Log4j. Anyway, have a look at
http://jakarta.apache.org/cactus/howto_config.html. It should help. In 2
words, you need to add your category to the log4j configuration file.

We need to rework Cactus logging as it is a bit of a mess and should
definitely be transparent ! Sorry for that.

Thanks
-Vincent

> -----Original Message-----
> From: JP_Menon@apex.soft.net [mailto:JP_Menon@apex.soft.net]
> Sent: 04 April 2002 13:23
> To: Cactus Users List
> Subject: RE: Advice needed
>
>
> hi,
> I am getting this error while trying to run The testcase from VAJ 4.0
>
> Is there any special configuration that needs to be done for this.I
have
> added the jars to the Class properties also.
>
>
> log4j:ERROR No appenders could be found for category
> (testcase.TestWebFrontServlet).
> log4j:ERROR Please initialize the log4j system properly.
>
> rgds,
> JP..
>
>
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
>




--
To unsubscribe, e-mail:   <
mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:cactus-user-help@jakarta.apache.org>






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


RE: problem using CactusStrutsTestCase

Posted by Vincent Massol <vm...@octo.com>.
Vishal,

See the Cactus FAQ on the web site (along with the Config Howto, also on
the web site that explains how to configure Cactus). It simply means you
do not have your cactus.properties file in your client side classpath.

-Vincent

> -----Original Message-----
> From: Vishal Kumar Singh [mailto:vishalkr@cisco.com]
> Sent: 08 April 2002 10:53
> To: Cactus Users List
> Subject: Re: problem using CactusStrutsTestCase
> 
> The problem of compilation has solved  as I got a distribution of
cactus
> which had
> the package structure as required by CactusStrutsTest.jar .
> But Now , I face a different problem :
> 
> It compiled properly , but, while execution gave the following error :
> I am following the same approach of executing test cases as I was
doing
> with
> MockStrutsTestCase.
> 
> /**************************ERROR*********************************/
> .log4j:ERROR No appenders could be found for category
> (com.cisco.nm.uii.example.
> actionform.TestPTFindPhonesAction).
> log4j:ERROR Please initialize the log4j system properly.
> E
> Time: 0.631
> There was 1 error:
> 1)
>
testPTFindPhonesResult(com.cisco.nm.uii.example.actionform.TestPTFindPho
ne
> sAc
> tion)
> java.lang.ExceptionInInitializerError:
java.util.MissingResourceException:
> Can't
>  find bundle for base name cactus, locale en_US
>         at
java.util.ResourceBundle.throwMissingResourceException(Unknown
> Source
> )
>         at java.util.ResourceBundle.getBundleImpl(Unknown Source)
>         at java.util.ResourceBundle.getBundle(Unknown Source)
>         at
> org.apache.cactus.client.AbstractHttpClient.<clinit>(AbstractHttpClie
> nt.java:88)
>         at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
>         at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
> /*****************************************************************/
> 
> 
> regards
> Vishal
> 
> Vishal Kumar Singh wrote:
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




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


Re: problem using CactusStrutsTestCase

Posted by Vishal Kumar Singh <vi...@cisco.com>.
The problem of compilation has solved  as I got a distribution of cactus which had
the package structure as required by CactusStrutsTest.jar .
But Now , I face a different problem :

It compiled properly , but, while execution gave the following error :
I am following the same approach of executing test cases as I was doing with
MockStrutsTestCase.

/**************************ERROR*********************************/
.log4j:ERROR No appenders could be found for category (com.cisco.nm.uii.example.
actionform.TestPTFindPhonesAction).
log4j:ERROR Please initialize the log4j system properly.
E
Time: 0.631
There was 1 error:
1) testPTFindPhonesResult(com.cisco.nm.uii.example.actionform.TestPTFindPhonesAc
tion)
java.lang.ExceptionInInitializerError: java.util.MissingResourceException: Can't
 find bundle for base name cactus, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(Unknown Source
)
        at java.util.ResourceBundle.getBundleImpl(Unknown Source)
        at java.util.ResourceBundle.getBundle(Unknown Source)
        at org.apache.cactus.client.AbstractHttpClient.<clinit>(AbstractHttpClie
nt.java:88)
        at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
        at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
/*****************************************************************/


regards
Vishal

Vishal Kumar Singh wrote:



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


problem using CactusStrutsTestCase

Posted by Vishal Kumar Singh <vi...@cisco.com>.
Hello ,
I faced problem using CactusStrutsTestCase.
When I derive my TestXXXAction from CactusStrutsTestCase , it gives the following
compilation error

TestPTFindPhonesAction.java:14: cannot access  org.apache.cactus.ServletTestCase
file org\apache\cactus\ServletTestCase.class not found
         public TestPTFindPhonesAction(String testname )
                                       ^

The problem is strutstestcase.jar has CactusStrutsTestCase  but  not
org.apache.cactus.ServletTestCase from
which it is derived wheras  MockStrutsTestCase is derived from
junit.framework.TestCase and
MockStrutsTestCase works fine just by putting junit.jar in the classpath.

When I downloaded Cactus lib files , the package was
org.apache.commons.cactus.ServletTestCase and not
org.apache.cactus.TestCase and hence it failed compilation.

My requirement is a method to get my FormBean in my TestXXXAction class.
This was not available using MockstrutsTestCase, so i wanted to use
CactusStrutstTestCase which provides a  getForm( ) method.
So, I extended the same class from CactusStrutsTestCase which was earlier
extended from MockStrutsTestCase.

Do I need to do some additional changes to use CactusStrutsTestCase. ?

The following is  package structure of CactusStrutsTestCase

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.apache.cactus.AbstractTestCase
                    |
                    +--org.apache.cactus.ServletTestCase
                          |
                          +--servletunit.struts.CactusStrutsTestCase

what should i do ? Should I change the package structure ?

regards
Vishal




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


RE: Log4j error

Posted by Vincent Massol <vm...@octo.com>.
Here is an example attached.

Thanks
-Vincent

> -----Original Message-----
> From: JP_Menon@apex.soft.net [mailto:JP_Menon@apex.soft.net]
> Sent: 07 April 2002 15:47
> To: Cactus Users List
> Subject: Log4j error
> 
> 
> Hi,
> 
> I followed the instructions given in the "how_to_config.html" but
still
> the
> Log4j Errors persists.
> [log4j:ERROR No appenders could be found for category]
> [log4j:ERROR Please initialize the log4j system properly]
> 
> can somebody pls  sent me  Log4j property files from the working
> environments so that I could cross check the same here.
> 
> thnks
> JP..
> 
> 
> 
> 
>                     "Vincent
>                     Massol"              To:     "'Cactus Users List'"
>                     <vmassol@octo.
<ca...@jakarta.apache.org>
>                     com>                 cc:
>                                          Subject:     RE: Advice
needed
>                     05/04/2002
>                     02:48 AM
>                     Please respond
>                     to "Cactus
>                     Users List"
> 
> 
> 
> 
> 
> 
> Hi,
> 
> You're probably using Cactus 1.2. In Cactus 1.3 this would not happen
as
> a root category is defined for Log4j. Anyway, have a look at
> http://jakarta.apache.org/cactus/howto_config.html. It should help. In
2
> words, you need to add your category to the log4j configuration file.
> 
> We need to rework Cactus logging as it is a bit of a mess and should
> definitely be transparent ! Sorry for that.
> 
> Thanks
> -Vincent
> 
> > -----Original Message-----
> > From: JP_Menon@apex.soft.net [mailto:JP_Menon@apex.soft.net]
> > Sent: 04 April 2002 13:23
> > To: Cactus Users List
> > Subject: RE: Advice needed
> >
> >
> > hi,
> > I am getting this error while trying to run The testcase from VAJ
4.0
> >
> > Is there any special configuration that needs to be done for this.I
> have
> > added the jars to the Class properties also.
> >
> >
> > log4j:ERROR No appenders could be found for category
> > (testcase.TestWebFrontServlet).
> > log4j:ERROR Please initialize the log4j system properly.
> >
> > rgds,
> > JP..
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:cactus-user-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:cactus-user-
> > help@jakarta.apache.org>
> >
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <
> mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:cactus-user-help@jakarta.apache.org>
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
>