Oliver, 

If you start your app from parent dir of "com/..." I have no idea what's wrong but if 
not you need to modify your path somehow. Maybe you need to resolve your path at 
runtime, something like MyClass.class.getResource("/" + configPath) or so?

Regards
Frank-Olaf Lohmann

>>> "TOMA,OLIVER (HP-Germany,ex1)" <[EMAIL PROTECTED]> 25.06.2001  13.23 Uhr >>>
hi frank,

this is not possible because my java application
finds the properties relative to my classes. that
means it is involved in the package structure and
don't need absolute paths.

String configPath = "com/lufthansatechnik/cws/more/log4j.properties";

    try{
      InputStream inputStream =
java.lang.ClassLoader.getSystemResourceAsStream(configPath);
      if(inputStream != null){
        log4jProperties.load(inputStream);
        inputStream.close();
      }
    }catch(java.io.IOException io){
      io.printStackTrace();
    }

oliver

-----Original Message-----
From: Frank-Olaf Lohmann [mailto:[EMAIL PROTECTED]] 
Sent: Montag, 25. Juni 2001 16:56
To: [EMAIL PROTECTED] 
Subject: Antw: PLEASE HELP, Problems on solaris


Hi Toma,

My experience is that this is the case if your app can not find the
properties file. I f you have specified no path it should be in the
directory where yo u start the VM.

Regards
Frank-Olaf Lohmann


>>> "TOMA,OLIVER (HP-Germany,ex1)" <[EMAIL PROTECTED]> 25.06.2001  
>>> 12.08 Uhr >>>
hi guys,

i actually got the following error message every time,
i run my application:

log4j:ERROR No appenders could be found for category (MORe Application).
log4j:ERROR Please initialize the log4j system properly.

as a result of this error i got neather logging on screen nor in a file, as
desired by my property-file:

---------------------------------------------------------------------------
#Set root category to debug and its only appender to R
log4j.rootCategory=DEBUG, stdout, R #log4j.rootCategory=DEBUG, R

#stdout set to be a console appender
log4j.appender.stdout=org.apache.log4j.ConsoleAppender

#stdout uses PatternLayout
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%t] (%F:%L) - %m%n

#R appender log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=LHMORe.log log4j.appender.R.MaxFileSize=100KB

#Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] (%F:%L) - %m%n
----------------------------------------------------------------------------
----

i use the logging in the following way:

i have a singleton which reads in the properties and instanciates the
category object with them (PropertyConfigurator.configure(props)).
there is also a method to deliver this category object to each class which
needs to log to this configuration (that mean to this file, screenlogging
becomes disabled later). as result, each class is logging to the same
category object. on the windows develpoment system, this works nearly pretty
good, but an the solaris there is no logging at all. neather an screen nor
in the desired file.

can you please help me? thanks in advance,
 oliver

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



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

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



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

Reply via email to