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 Robert Dodier <ro...@infotility.com> on 2008/01/12 01:28:10 UTC

Adapting log4j to IBM J9 JVM

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

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


Re: Adapting log4j to IBM J9 JVM

Posted by Robert Dodier <ro...@infotility.com>.
On 1/14/08, Roman <ro...@gmail.com> wrote:

> I had the same problem.
> I was able to extract needed java.beans classes from sun's java implementation.
> It is 18 classes.

Thanks for the advice, Roman. I will give it a try.

Robert Dodier

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


Re: Adapting log4j to IBM J9 JVM

Posted by Roman <ro...@gmail.com>.
Hello Robert.

I had the same problem.
I was able to extract needed java.beans classes from sun's java implementation.
It is 18 classes.
And it runs.

Regards,

Roman





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


Re: Adapting log4j to IBM J9 JVM

Posted by Robert Dodier <ro...@infotility.com>.
On 1/11/08, Curt Arnold <ca...@apache.org> wrote:

> First of all, do you have a hard requirement to be able to compile on
> the J9 JVM?

No, I'm just considering it as an alternative to JamVM + Classpath.

> 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?

I don't remember exactly how I found it originally. Looks like
Wikipedia has a sketchy article with working links:
http://en.wikipedia.org/wiki/IBM_J9
Also try searching the IBM website for J9 + Websphere Micro Environment.
IBM has a free download for Linux + x86 although not for ARM;
I have obtained an evaluation copy of J9 for ARM from MicroDoc
(http://microdoc.de).

Hope this information is useful to someone.

Robert Dodier

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


Re: Adapting log4j to IBM J9 JVM

Posted by Curt Arnold <ca...@apache.org>.
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