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 -0000 >Received: (qmail 29879 invoked by uid 98); 12 Jul 2002 23:24:56 -0000 >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: >