logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Adapting log4j to IBM J9 JVM
Date Sat, 12 Jan 2008 01:09:20 GMT

On Jan 11, 2008, at 6:28 PM, Robert Dodier wrote:

> Hello,
> I am attempting to run a program which uses log4j 1.2.9 on
> the IBM J9 JVM. Unfortunately J9 doesn't include java.beans.*
> and log4j makes use of a few java.beans classes (BeanInfo and
> a few others).
> I've tried a few things. (1) I looked at the log4j source code to
> see how much trouble it would be to expunge the java.beans.*
> references. Looks like it would be some work to replace it.
> (2) Attempted to compile the java.beans classes from another
> JVM (namely Classpath). Failed to compile -- references to
> other Classpath-specific stuff outside of beans. Rats.
> I guess reimplementing the log4j classes (just to provide
> empty placeholders would be enough to get the program running)
> is an option too but I haven't done that yet.
> I wonder if anyone else has gotten log4j + J9 working and if so
> I wonder how it was accomplished.
> Thanks for any advice.
> Robert Dodier

First of all, do you have a hard requirement to be able to compile on  
the J9 JVM?  Even if you do, you could start with log4j.jar from the  
release and as long as you avoided any code that used the java.beans  
classes, you would avoid the dreaded ClassNotFoundException.

Looking at the references, it appears that the most significant and  
hardest to avoid usage of java.beans classes would be in  
org.apache.log4j.config.PropertySetter which in turn is used by  
PropertyConfigurator and DOMConfigurator.  Without the java.beans  
classes available, it looks like you could still use log4j as long as  
you explicitly configured log4j with API calls and did not attempt to  
configure from .properties or .xml files.

I found a lot of references to J9 in a search, but none of them seemed  
like a definitive home page for the JVM.   Could you suggest one?

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

View raw message