You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ronnie Choo <lo...@yahoo.com.sg> on 2003/02/28 07:18:26 UTC

Really Newbie Problem

Hi! I'm still a student studying J2EE and ran into
this problem while setting up my Log4J running with
Tomcat 4.0.1 for my project.

The problem is that it works Perfectly on my Desktop
but runs into this problem on my laptop:

log4j:ERROR No appenders could be found for category
(edu.rmit.isys2049.EmployeeAccessBean).
log4j:ERROR Please initialize the log4j system
properly.

The documentation states that i need to "Simply add an
appender to the rootCategory". I have done exactly
that but to no avail!

I'm using JDK1.3.1_02 and the paths have already been
set correctly as it's exactly the same as my desktop.

Ant help is greatly appreciated as nobody in school,
including the lecturers, seems to be able to help me!


Here's my log4j.properties file configuration:

log4j.rootCategory=WARN,FILE,A1
log4j.category.edu.rmit.isys2049.EmployeeAccessBean=DEBUG
log4j.appender.FILE=org.apache.log4j.FileAppender
log4j.appender.FILE.File=C:/temp/tomcat.log
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.File=d:/temp/trace.log
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d [%t ]
%-5p %c{1}-%m%n
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t ]
%-5p %c{1}-%m%n

Regards,
Ronnie Choo
Student of RMIT University

__________________________________________________
Do You Yahoo!?
Promote your business from just $5 a month!
http://sg.biztools.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Really Newbie Problem

Posted by Ronnie <lo...@yahoo.com.sg>.
No question is silly for a newbie! =)

Yes I did restart Tomcat after changing the file location.
I'm using log4j.properties so doesn't that configure the logging?

I just tried another exercise using EJB in JBoss and JBoss was unable to
initialize the default ConsoleAppender as well...
Headache...

----- Original Message -----
From: "Steve Ebersole" <st...@austin.rr.com>
To: "Log4J Users List" <lo...@jakarta.apache.org>
Sent: Friday, 28 February, 2003 9:41 PM
Subject: Re: Really Newbie Problem


> Silly question, but did you restart Tomcat after changing the file
location?
>
> Also, are you allowing default initilization to happen, or are you
> explicitly trying to use one of the configurators?
>
>
> ----- Original Message -----
> From: "Ronnie Choo" <lo...@yahoo.com.sg>
> To: "Log4J Users List" <lo...@jakarta.apache.org>
> Sent: Friday, February 28, 2003 12:43 AM
> Subject: Re: Really Newbie Problem
>
>
> > I just tried putting it in the
> > webapps/<appname>/WEB-INF/classes folder but still the
> > same error.
> >
> > Thanks for the suggestion!
> >
> >  --- Scott Schram <sc...@schram.net> wrote: > At 12:36
> > AM 2/28/2003, you wrote:
> > > >I placed it in the {catalina-home}/common/lib
> > > folder.
> > > >
> > > >it works on my desktop though...
> > > >Maybe it's an issue with Win XP with SP1?
> > > >I'm at my wits end...
> > >
> > > Shouldn't it be in the WEB-INF/classes directory of
> > > your web app?  That's
> > > where I'm putting log4j.xml
> > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > log4j-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > log4j-user-help@jakarta.apache.org
> > >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Promote your business from just $5 a month!
> > http://sg.biztools.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org

__________________________________________________
Do You Yahoo!?
Promote your business from just $5 a month!
http://sg.biztools.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Really Newbie Problem

Posted by Steve Ebersole <st...@austin.rr.com>.
Silly question, but did you restart Tomcat after changing the file location?

Also, are you allowing default initilization to happen, or are you
explicitly trying to use one of the configurators?


----- Original Message -----
From: "Ronnie Choo" <lo...@yahoo.com.sg>
To: "Log4J Users List" <lo...@jakarta.apache.org>
Sent: Friday, February 28, 2003 12:43 AM
Subject: Re: Really Newbie Problem


> I just tried putting it in the
> webapps/<appname>/WEB-INF/classes folder but still the
> same error.
>
> Thanks for the suggestion!
>
>  --- Scott Schram <sc...@schram.net> wrote: > At 12:36
> AM 2/28/2003, you wrote:
> > >I placed it in the {catalina-home}/common/lib
> > folder.
> > >
> > >it works on my desktop though...
> > >Maybe it's an issue with Win XP with SP1?
> > >I'm at my wits end...
> >
> > Shouldn't it be in the WEB-INF/classes directory of
> > your web app?  That's
> > where I'm putting log4j.xml
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > log4j-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > log4j-user-help@jakarta.apache.org
> >
>
> __________________________________________________
> Do You Yahoo!?
> Promote your business from just $5 a month!
> http://sg.biztools.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Really Newbie Problem

Posted by Ronnie Choo <lo...@yahoo.com.sg>.
I just tried putting it in the
webapps/<appname>/WEB-INF/classes folder but still the
same error.

Thanks for the suggestion!

 --- Scott Schram <sc...@schram.net> wrote: > At 12:36
AM 2/28/2003, you wrote:
> >I placed it in the {catalina-home}/common/lib
> folder.
> >
> >it works on my desktop though...
> >Maybe it's an issue with Win XP with SP1?
> >I'm at my wits end...
> 
> Shouldn't it be in the WEB-INF/classes directory of
> your web app?  That's 
> where I'm putting log4j.xml
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> log4j-user-help@jakarta.apache.org
>  

__________________________________________________
Do You Yahoo!?
Promote your business from just $5 a month!
http://sg.biztools.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Really Newbie Problem

Posted by Scott Schram <sc...@schram.net>.
At 12:36 AM 2/28/2003, you wrote:
>I placed it in the {catalina-home}/common/lib folder.
>
>it works on my desktop though...
>Maybe it's an issue with Win XP with SP1?
>I'm at my wits end...

Shouldn't it be in the WEB-INF/classes directory of your web app?  That's 
where I'm putting log4j.xml



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Really Newbie Problem

Posted by Ronnie Choo <lo...@yahoo.com.sg>.
I placed it in the {catalina-home}/common/lib folder.

it works on my desktop though...
Maybe it's an issue with Win XP with SP1?
I'm at my wits end...


 --- Ceki Gülcü <ce...@qos.ch> wrote: > 
> Log4j probably cannot find the log4j.properties
> file. Where have you placed 
> it?
> 

__________________________________________________
Do You Yahoo!?
Promote your business from just $5 a month!
http://sg.biztools.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Really Newbie Problem

Posted by Ceki Gülcü <ce...@qos.ch>.
Log4j probably cannot find the log4j.properties file. Where have you placed 
it?

At 02:18 PM 2/28/2003 +0800, you wrote:
>Hi! I'm still a student studying J2EE and ran into
>this problem while setting up my Log4J running with
>Tomcat 4.0.1 for my project.
>
>The problem is that it works Perfectly on my Desktop
>but runs into this problem on my laptop:
>
>log4j:ERROR No appenders could be found for category
>(edu.rmit.isys2049.EmployeeAccessBean).
>log4j:ERROR Please initialize the log4j system
>properly.
>
>The documentation states that i need to "Simply add an
>appender to the rootCategory". I have done exactly
>that but to no avail!
>
>I'm using JDK1.3.1_02 and the paths have already been
>set correctly as it's exactly the same as my desktop.
>
>Ant help is greatly appreciated as nobody in school,
>including the lecturers, seems to be able to help me!
>
>
>Here's my log4j.properties file configuration:
>
>log4j.rootCategory=WARN,FILE,A1
>log4j.category.edu.rmit.isys2049.EmployeeAccessBean=DEBUG
>log4j.appender.FILE=org.apache.log4j.FileAppender
>log4j.appender.FILE.File=C:/temp/tomcat.log
>log4j.appender.A1=org.apache.log4j.FileAppender
>log4j.appender.A1.File=d:/temp/trace.log
>log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
>log4j.appender.FILE.layout.ConversionPattern=%d [%t ]
>%-5p %c{1}-%m%n
>log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>log4j.appender.A1.layout.ConversionPattern=%d [%t ]
>%-5p %c{1}-%m%n
>
>Regards,
>Ronnie Choo
>Student of RMIT University
>
>__________________________________________________
>Do You Yahoo!?
>Promote your business from just $5 a month!
>http://sg.biztools.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org