logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@houston.rr.com>
Subject Re: Linux RedHat 9.0
Date Tue, 28 Jun 2005 22:36:45 GMT
> When I run my exe I get the following error:
> Could not instantiate class [org.apache.log4j.FileAppender]
> Class 'org.apache.log4j.FileAppender' not found
> Is this saying my liblog4cxx.a library I'm linking to my exe does
> not contain a needed class?  If so, how do I rebuild liblog4cxx.a
> so it see's the needed class?

The problem is likely not the presence of FileAppender but the  
relative order of execution of the static initializer that adds the  
entry for the FileAppender to the internal list of available classes  
and the static initializer that causes the default configuration file  
to be loaded.  In log4cxx-0.9.7, the code just hoped that they would  
be fired in a favorable order (registering the class before  
processing the configuration file).

Fixing this problem and other problems related to static initializers  
required pretty pervasive changes, so it is unlikely to be able to  
tweak log4cxx-0.9.7 to fix the problem if it appears.  Perhaps you  
could avoid the problem by not using default configuration and doing  
an explicit configuration sometime after all the static initializers  
have completed, but I can't offer any guarantees.

View raw message