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 Dirk Materlik <ma...@inf.fu-berlin.de> on 2003/11/14 12:29:58 UTC

Log4J 1.2.8 not functional with J2ME

Hi,
I am trying to use Log4J with the Sun implementation of the Java 2,
Micro Edition on the Sharp Zaurus. This used to work without problems,
however, with 1.2.8 I get a ClassNotFoundException for
java.beans.Introspector when I try using PropertyConfigurator. This is
expected behaviour, since java.beans is not part of J2ME. This is rather
unfortunate since PropertyConfigurator seems to me to be the most basic,
but useful Configurator available.

Are there any solutions for me? I can think of the following, which all
have drawbacks:

- Revert to older version
Bad, since I laboriously converted every use of Category to Logger
(since Category is now deprecated). Also, we upgraded for a reason, e.g.
the more sophisticated Socket-Appenders available now.

- Log4JME
Seems like a good idea, but is severely out of date. I updated it
somewhat (so Logger, ConsoleAppender etc. are available) but it is still
not functioning completely correctly. Also lacks functionality we would
like to have on the embedded device. Most importantly, we're using log4j
precisely because we do *not* want to maintain our own logging
framework.

- check out Log4J sources and modify BasicConfigurator
Probably the path I'll go down, but I don't really want to mess with the
framework and then not be able to upgrade again.

- Deploy java.beans.Introspector with application
Might lead to further dependencies. Also not really a good solution,
since not all VMs might need it. Might also have licensing issues.

- Stub out Log4J usages
This at least yields a functional application, but no logging. So,
System.out.println and recompile, deploy all the time.


Mailing list archives and web site do not seem to give additional ideas.
Anyone have any?

thanks,
Dirk.

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