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 Ceki Gülcü <ce...@qos.ch> on 2002/07/13 00:54:22 UTC

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

The root cause of this problem, that is the [object is not assignable
to a "org.apache.log4j.Appender"] complaint, stems from having two
copies of log4j classes available to your application. Simply ensure
that only one copy of log4j-x.x.jar is available and the problem will
go away.

In your case, it seems that jrun-doclet.jar has its own copy of log4j
as a person nicknamed "edhill" indicates:

   Just to add a little more information...

   When I tried switching to log4j-1.2.jar, I noticed that the stack
   trace was exactly the same as the log4j-1.1.3 jar from before, which
   tells me of course, that the ClassLoader is not using either of my
   log4j jars in my lib directory.

   More digging finds an old version of log4j inside of you
   jrun-doclet.jar, and commons-logging stuff inside your webservices.jar
   file. I'm just wondering if these are interfearing with the log4j that
   I'm trying to use from within my application.

This quote is extracted from the following thread which contains other
useful information:

http://webforums.macromedia.com/jrun/messageview.cfm?catid=254&threadid=344780

I hope this helps,

At 18:20 12.07.2002 -0400, Whitney White wrote:
>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

--
Ceki


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