log4j-user  

log4j in J2ME

Marcus Hock
Tue, 16 Dec 2003 04:26:54 -0800

Hi!

I have a problem running log4j in a J2ME-PersonalProfile Enironment.
I use CrEme, a Runtime Environment which includes a PDA-Env. and a Windows Emulator.
Everything compiles well (as J2SE is used for compilation) and it runs well in J2SE.
The Problem occurs in the Emulator / the PDA Environment:


Using the statement

BasicConfigurator.configure();

I get the Error

------------>8------------>8----------------------
C:\CVS\final1>"C:/Programme/NSIcom JSCP V4.00/bin/pJSCP.exe" -classpath ./classe
s Trivial


NSIcom, Software Co-Processor for Java: JSCP

JSCP J2ME(tm)
JSCP V4.00 B10.031026 26-Oct-2003
(Win32 edition)  MemoryLimit=32768Kb
java.lang.IncompatibleClassChangeError: Unimplemented interface method
        at org.apache.log4j.BasicConfigurator.configure()
        at Trivial.main()
Hit any key to continue ...
------------>8------------>8----------------------

So I tried:

 static Logger logger = Logger.getLogger(MP3cloud.class.getName());
[...]
 PropertyConfigurator.configure("sort1.properties");

Which produces the Message:

------------>8------------>8----------------------
NSIcom, Software Co-Processor for Java: JSCP

JSCP J2ME(tm)
JSCP V4.00 B10.031026 26-Oct-2003
(Win32 edition) MemoryLimit=32768Kb
<*>20 Class missing for error "java/lang/ClassNotFoundException" at java.lang.C
lassLoader.findBootstrapClass()
Detail=org/apache/log4j/ConsoleAppender
java.lang.NoClassDefFoundError: org/apache/log4j/AppenderSkeleton
at java.lang.Class.forName()
at org.apache.log4j.helpers.Loader.loadClass()
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName()
at org.apache.log4j.helpers.OptionConverter.instantiateByKey()
at org.apache.log4j.PropertyConfigurator.parseAppender()
at org.apache.log4j.PropertyConfigurator.parseCategory()
at org.apache.log4j.PropertyConfigurator.configureRootCategory()
at org.apache.log4j.PropertyConfigurator.doConfigure()
at org.apache.log4j.PropertyConfigurator.doConfigure()
at org.apache.log4j.PropertyConfigurator.configure()
at MP3cloud.main()
Hit any key to continue ...
make: *** [runm] Error 97
------------>8------------>8----------------------


My question:
Is there any possibility to run log4j in the J2ME Personal Profile environment?
I've seen that several packages like java.util.logging, which is included in J2SE, do not exist in J2ME - is that package required?
Or is my problem the J2ME-PP runtime environment, CrEme (www.nsicom.com)? Any 'better' J2ME-PP RE's?


TIA for any answers,

Marcus Hock

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • log4j in J2ME Marcus Hock