org.apache.log4j.DailyRollingFileAppender

2003-10-03 Thread Clare . Myers
My java application running on AIX uses the DailyRollingFileAppender.
Every so often, the roll-over does not occur at midnight, but later.
Perhaps even a day later.  Has anyone experienced this problem?

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472




CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
is for the sole use of the intended recipient(s) and may contain confidential
and privileged information or otherwise protected by law.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: org.apache.log4j.DailyRollingFileAppender

2003-10-03 Thread Shapira, Yoav

Howdy,
Yes.

Search the archives.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:00 PM
To: [EMAIL PROTECTED]
Subject: org.apache.log4j.DailyRollingFileAppender

My java application running on AIX uses the DailyRollingFileAppender.
Every so often, the roll-over does not occur at midnight, but later.
Perhaps even a day later.  Has anyone experienced this problem?

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472




CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential
and privileged information or otherwise protected by law.  Any
unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the
intended recipient, please contact the sender by reply e-mail and
destroy
all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: org.apache.log4j.DailyRollingFileAppender

2003-10-03 Thread Clare . Myers

I found alot of things about how to get the DailyRollingFileAppender to
roll at a scheduled time instead of when a record is written.  The problem
that I am having is that the rollover is not happening when a record is
written after the date changes.

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472


   

  Shapira, Yoav  

  [EMAIL PROTECTED]To:   Log4J Users List [EMAIL 
PROTECTED]
  .comcc: 

   Subject:  RE: 
org.apache.log4j.DailyRollingFileAppender 
  10/03/2003 03:02 

  PM   

  Please respond to

  Log4J Users 

  List

   

   






Howdy,
Yes.

Search the archives.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:00 PM
To: [EMAIL PROTECTED]
Subject: org.apache.log4j.DailyRollingFileAppender

My java application running on AIX uses the DailyRollingFileAppender.
Every so often, the roll-over does not occur at midnight, but later.
Perhaps even a day later.  Has anyone experienced this problem?

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472




CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential
and privileged information or otherwise protected by law.  Any
unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the
intended recipient, please contact the sender by reply e-mail and
destroy
all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an) intended
recipient, please immediately delete this e-mail from your computer system
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
is for the sole use of the intended recipient(s) and may contain confidential
and privileged information or otherwise protected by law.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies of the original message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A org.apache.log4j.DailyRollingFileAppender object is not assignable to...

2002-07-15 Thread Whtiney J. White

Martin,
  init() is called once and only once during the lifetime of a servlet.  But 
servlets have many lives.  The lifetime of a servlet begins when it's instantiated and 
ends when its garbage callected by the servlet runner (either due to disuse, or for 
dynamic servlet reloading, or because Jrun's restarted, or many other reasons).

  When the servlet runner goes to re-initialize the servlet, the servlet's init method 
is called.  It appears, however, that it's also attempting to reload all the 
supporting classes from WEB-INF/lib at the same time, and something isn't ready.  

  Has anyone else had success getting log4j to work with Jrun?  This isn't making a 
lot of sense, unless I have something configured wrong.

Whit

  
  - Original Message - 
  From: Martin Gainty 
  To: [EMAIL PROTECTED] 
  Cc: [EMAIL PROTECTED] 
  Sent: Saturday, July 13, 2002 3:26 PM
  Subject: Re: A org.apache.log4j.DailyRollingFileAppender object is not assignable 
to...


  Whit:

  so init() is called once and only once correct???
  if you delete the class and recreate it.. how does JRun know this class should be 
initialised again??
  Sounds like JRun doesnt have capability to 'reinitialise itself'.
  Correct??

  Martin Gainty

  __

  Disclaimer and confidentiality note

  Everything in this e-mail and any attachments relating to the official business of 
Laconia Data Systems (LDS) is proprietary to the company. It is confidential, legally 
privileged and protected by law. LDS does not own and endorse any other content. Views 
and opinions are those of the sender unless clearly stated as being that of LDS. 

  The person addressed in the e-mail is the sole authorised recipient. Please notify 
the sender immediately if it has unintentionally reached you and do not read, disclose 
or use the content in any way.


  LDS can not assure that the integrity of this communication has been maintained nor 
that it is free of errors, virus, interception or interference.

   ___



  From: Whitney White 
  Reply-To: Log4J Users List 
  To: [EMAIL PROTECTED] 
  Subject: Re: A org.apache.log4j.DailyRollingFileAppender object is not assignable 
to... 
  Date: Fri, 12 Jul 2002 19:24:41 -0400 
  MIME-Version: 1.0 
  X-Originating-IP: [65.203.47.248] 
  Received: from nagoya.betaversion.org ([192.18.49.131]) by 
mc2-f14.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Sat, 13 Jul 2002 
02:39:59 -0700 
  Received: (qmail 719 invoked by uid 97); 13 Jul 2002 09:42:12 - 
  Received: (qmail 29879 invoked by uid 98); 12 Jul 2002 23:24:56 - 
  Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm 
  Precedence: bulk 
  List-Unsubscribe: 
  List-Subscribe: 
  List-Help: 
  List-Post: 
  List-Id: Log4J Users List 
  Delivered-To: mailing list [EMAIL PROTECTED] 
  X-Antivirus: nagoya (v4198 created Apr 24 2002) 
  Message-ID: 
  X-OriginalArrivalTime: 12 Jul 2002 23:24:41.0495 (UTC) FILETIME=[4C640A70:01C229FB] 
  X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 
  Return-Path: [EMAIL PROTECTED] 
   
  Ceki, 
   Thanks for your response; I've done some more digging and 
  discovered the following behavior. 
   
   
   As I said before when I first start jrun, everything is perfectly 
  fine; if I touch then my servlet class, causing Jrun to dynamically 
  destroy it and reload it, this causes log4j to report the following: 
   
   
  log4j:ERROR A org.apache.log4j.DailyRollingFileAppender object is 
  not assignable to a org.apache.log4j.Appender variable. 
  log4j:ERROR Could not instantiate appender named A1. 
  log4j:ERROR A org.apache.log4j.net.SMTPAppender object is not 
  assignable to a org.apache.log4j.Appender variable. 
  log4j:ERROR Could not instantiate appender named ML. 
  log4j:WARN No appenders could be found for logger 
  (HelloSso2Servlet). 
  log4j:WARN Please initialize the log4j system properly. 
   
  I indicated this before. Now, perhaps you can explain the 
  following: 
   
  If I then programmatically cause the servlet to call its own init() 
  method later, after it has already been instantiated (when log4j 
  failed to initialize), then everything returns to normal and log4j 
  correctly initializes. 
   
  Why does that happen? It's as if log4j cannot initialize when jrun 
  first dynamically reloads the servlet-- but later, after the servlet 
  has been instantiated, the PropertyConfigurator is successful. 
   
  Is there some sort of race condition? How can I get around this? 
   
  Thanks again, 
  Whit 
   
   
  _ 
  MSN Photos is the easiest way to share and print your photos: 
  http://photos.msn.com/support/worldwide.aspx 
   
   
  -- 
  To unsubscribe, e-mail: 
   
  For additional commands, e-mail: 
   



Re: A org.apache.log4j.DailyRollingFileAppender object is not assignable to...

2002-07-15 Thread Whitney White

Not that I doubted you...

but you're absolutely right.  Switching to log4j-1.2.1.jar fixed my problem; 
my servlets are now able to reinitialize the root logger when they're 
dynamically reloaded by Jrun.

But does this mean that Jrun is incompatible with the later versions of 
log4j?  I'm unable to discern where Jrun is loading log4j classes or how to 
stop that from happening.  Any suggestions?

Whit


From: Ceki Gülcü [EMAIL PROTECTED]



Whitney,
To convince yourself that the error is linked to having two distinct
copies of log4j classes present in memory each of which is accessible
by a different class loader, as well as the TCL settings as desribed
in an earlier mail, you can use log4j 1.2.1 which does not use the
TCL. Log4j 1.2.1 is available here:

http://jakarta.apache.org/log4j/jakarta-log4j-1.2.1.tar.gz

(Log4j 1.2.1 ignores the TCL.)

Please let us know if using log4j 1.2.1 solves the problem.

At 00:07 14.07.2002 +0200, Ceki Gülcü wrote:

The error [org.apache.log4j.DailyRollingFileAppender object is not
assignable to a org.apache.log4j.Appender variable.] means in no
uncertain terms that two distinct copies of log4j classes are present
in memory each of which is accessible by a different class
loader.

Here is a typical scenario. Let us assume that log4j.jar is accessible
on the system class loader (the classloader in charge of the
CLASSPATH) as well as to the classloader that is associated with
WEB-INF/lib. Let S be the system classloader and W the WEB-INF/lib
classloader. Let us also assume that the Thread Context Classloader is
not set. Code loaded by W trying to configure log4j by invoking
PropertyConfigurator will generate the [object is not assignable]
error because PropertyConfigurator (loaded by W) will attempt to load
appender classes using the Thread Context Classloader which defaults
to S, if not set. However, copies of the same class loaded by
different class loaders are incompatible. Hence the object is not
assignable message...

This is consistent with the behavior you observe because the TCL can
evolve during the life cycle of a web-application.

Did I mention that the problem is due to having two distinct copies of
log4j classes being present in memory each of which is accessible by a
different class loader?

At 19:24 12.07.2002 -0400, you wrote:
Ceki,
  Thanks for your response; I've done some more digging and discovered 
the following behavior.


  As I said before when I first start jrun, everything is perfectly fine; 
if I touch then my servlet class, causing Jrun to dynamically destroy it 
and reload it, this causes log4j to report the following:


log4j:ERROR A org.apache.log4j.DailyRollingFileAppender object is not 
assignable to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named A1.
log4j:ERROR A org.apache.log4j.net.SMTPAppender object is not 
assignable to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named ML.
log4j:WARN No appenders could be found for logger (HelloSso2Servlet).
log4j:WARN Please initialize the log4j system properly.

I indicated this before.  Now, perhaps you can explain the following:

If I then programmatically cause the servlet to call its own init() 
method later, after it has already been instantiated (when log4j failed 
to initialize), then everything returns to normal and log4j correctly 
initializes.

Why does that happen?  It's as if log4j cannot initialize when jrun first 
dynamically reloads the servlet-- but later, after the servlet has been 
instantiated, the PropertyConfigurator is successful.

Is there some sort of race condition?  How can I get around this?

Thanks again,
Whit

--
Ceki


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]


--
Ceki




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: A org.apache.log4j.DailyRollingFileAppender object is not assignable to...

2002-07-15 Thread Ceki Gülcü


Whitney,
To convince yourself that the error is linked to having two distinct
copies of log4j classes present in memory each of which is accessible
by a different class loader, as well as the TCL settings as desribed
in an earlier mail, you can use log4j 1.2.1 which does not use the
TCL. Log4j 1.2.1 is available here:

http://jakarta.apache.org/log4j/jakarta-log4j-1.2.1.tar.gz

(Log4j 1.2.1 ignores the TCL.)

Please let us know if using log4j 1.2.1 solves the problem.

At 00:07 14.07.2002 +0200, Ceki Gülcü wrote:

The error [org.apache.log4j.DailyRollingFileAppender object is not
assignable to a org.apache.log4j.Appender variable.] means in no
uncertain terms that two distinct copies of log4j classes are present
in memory each of which is accessible by a different class
loader.

Here is a typical scenario. Let us assume that log4j.jar is accessible
on the system class loader (the classloader in charge of the
CLASSPATH) as well as to the classloader that is associated with
WEB-INF/lib. Let S be the system classloader and W the WEB-INF/lib
classloader. Let us also assume that the Thread Context Classloader is
not set. Code loaded by W trying to configure log4j by invoking
PropertyConfigurator will generate the [object is not assignable]
error because PropertyConfigurator (loaded by W) will attempt to load
appender classes using the Thread Context Classloader which defaults
to S, if not set. However, copies of the same class loaded by
different class loaders are incompatible. Hence the object is not
assignable message...

This is consistent with the behavior you observe because the TCL can
evolve during the life cycle of a web-application.

Did I mention that the problem is due to having two distinct copies of
log4j classes being present in memory each of which is accessible by a
different class loader?

At 19:24 12.07.2002 -0400, you wrote:
Ceki,
  Thanks for your response; I've done some more digging and discovered 
 the following behavior.


  As I said before when I first start jrun, everything is perfectly fine; 
 if I touch then my servlet class, causing Jrun to dynamically destroy it 
 and reload it, this causes log4j to report the following:


log4j:ERROR A org.apache.log4j.DailyRollingFileAppender object is not 
assignable to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named A1.
log4j:ERROR A org.apache.log4j.net.SMTPAppender object is not 
assignable to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named ML.
log4j:WARN No appenders could be found for logger (HelloSso2Servlet).
log4j:WARN Please initialize the log4j system properly.

I indicated this before.  Now, perhaps you can explain the following:

If I then programmatically cause the servlet to call its own init() 
method later, after it has already been instantiated (when log4j failed 
to initialize), then everything returns to normal and log4j correctly 
initializes.

Why does that happen?  It's as if log4j cannot initialize when jrun first 
dynamically reloads the servlet-- but later, after the servlet has been 
instantiated, the PropertyConfigurator is successful.

Is there some sort of race condition?  How can I get around this?

Thanks again,
Whit

--
Ceki


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


--
Ceki


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: A org.apache.log4j.DailyRollingFileAppender object is not assignable to...

2002-07-15 Thread Ceki Gülcü



At 11:06 15.07.2002 -0400, Whitney White wrote:
Not that I doubted you...

but you're absolutely right.  Switching to log4j-1.2.1.jar fixed my 
problem; my servlets are now able to reinitialize the root logger when 
they're dynamically reloaded by Jrun.

Good. Thanks for letting us know.

But does this mean that Jrun is incompatible with the later versions of 
log4j?

I will add an option called log4j.ignoreTCL such that log4j 1.2.6+ can
optionally behave like 1.2.1.

I'm unable to discern where Jrun is loading log4j classes or how to stop 
that from happening.  Any suggestions?

Have you read the following?

http://marc.theaimsgroup.com/?l=log4j-userm=102651447910279w=2

Whit

--
Ceki


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: A org.apache.log4j.DailyRollingFileAppender object is not assignable to...

2002-07-13 Thread Whitney White

Ceki,
  Thanks for your response; I've done some more digging and discovered the 
following behavior.


  As I said before when I first start jrun, everything is perfectly fine; if 
I touch then my servlet class, causing Jrun to dynamically destroy it and 
reload it, this causes log4j to report the following:


log4j:ERROR A org.apache.log4j.DailyRollingFileAppender object is not 
assignable to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named A1.
log4j:ERROR A org.apache.log4j.net.SMTPAppender object is not assignable 
to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named ML.
log4j:WARN No appenders could be found for logger (HelloSso2Servlet).
log4j:WARN Please initialize the log4j system properly.

I indicated this before.  Now, perhaps you can explain the following:

If I then programmatically cause the servlet to call its own init() method 
later, after it has already been instantiated (when log4j failed to 
initialize), then everything returns to normal and log4j correctly 
initializes.

Why does that happen?  It's as if log4j cannot initialize when jrun first 
dynamically reloads the servlet-- but later, after the servlet has been 
instantiated, the PropertyConfigurator is successful.

Is there some sort of race condition?  How can I get around this?

Thanks again,
Whit


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: A org.apache.log4j.DailyRollingFileAppender object is not assignable to...

2002-07-13 Thread Ceki Gülcü


The error [org.apache.log4j.DailyRollingFileAppender object is not
assignable to a org.apache.log4j.Appender variable.] means in no
uncertain terms that two distinct copies of log4j classes are present
in memory each of which is accessible by a different class
loader.

Here is a typical scenario. Let us assume that log4j.jar is accessible
on the system class loader (the classloader in charge of the
CLASSPATH) as well as to the classloader that is associated with
WEB-INF/lib. Let S be the system classloader and W the WEB-INF/lib
classloader. Let us also assume that the Thread Context Classloader is
not set. Code loaded by W trying to configure log4j by invoking
PropertyConfigurator will generate the [object is not assignable]
error because PropertyConfigurator (loaded by W) will attempt to load
appender classes using the Thread Context Classloader which defaults
to S, if not set. However, copies of the same class loaded by
different class loaders are incompatible. Hence the object is not
assignable message...

This is consistent with the behavior you observe because the TCL can
evolve during the life cycle of a web-application.

Did I mention that the problem is due to having two distinct copies of
log4j classes being present in memory each of which is accessible by a
different class loader?

At 19:24 12.07.2002 -0400, you wrote:
Ceki,
  Thanks for your response; I've done some more digging and discovered the 
 following behavior.


  As I said before when I first start jrun, everything is perfectly fine; 
 if I touch then my servlet class, causing Jrun to dynamically destroy it 
 and reload it, this causes log4j to report the following:


log4j:ERROR A org.apache.log4j.DailyRollingFileAppender object is not 
assignable to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named A1.
log4j:ERROR A org.apache.log4j.net.SMTPAppender object is not assignable 
to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named ML.
log4j:WARN No appenders could be found for logger (HelloSso2Servlet).
log4j:WARN Please initialize the log4j system properly.

I indicated this before.  Now, perhaps you can explain the following:

If I then programmatically cause the servlet to call its own init() method 
later, after it has already been instantiated (when log4j failed to 
initialize), then everything returns to normal and log4j correctly initializes.

Why does that happen?  It's as if log4j cannot initialize when jrun first 
dynamically reloads the servlet-- but later, after the servlet has been 
instantiated, the PropertyConfigurator is successful.

Is there some sort of race condition?  How can I get around this?

Thanks again,
Whit

--
Ceki


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




A org.apache.log4j.DailyRollingFileAppender object is not assignable to...

2002-07-12 Thread Whitney White

I'm using log4j with Allaire's JRun product.  I have the log4j-VERSION jar 
all set up in the WEB-INF/lib directory with my web app and all seems very 
happy and works fine.

Except, when my servlet (from which I'm logging stuff) gets garbage 
collected, log4j doesn't seem to want to reinitialize correctly when the 
servlet is later reinstantiated, so basically, if I want my servlet's 
logging to come back to life, I have to restart my jrun server.  And that's 
no good.

Upon the attempted re-initialization of my servlet, I get the following 
messages from log4j in my stderr:

log4j:ERROR A org.apache.log4j.DailyRollingFileAppender object is not 
assignable to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named A1.
log4j:ERROR A org.apache.log4j.net.SMTPAppender object is not assignable 
to a org.apache.log4j.Appender variable.
log4j:ERROR Could not instantiate appender named ML.
log4j:WARN No appenders could be found for logger (HelloSso2Servlet).
log4j:WARN Please initialize the log4j system properly.

Please note:  If I restart jrun the initialization is compeletely fine; 
everything works with no problems.  The messages above result when my 
servlet is unloaded by Jrun, and later re-instantiated.

Thanks for any help,
Whit



_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]