I think your properties file needs to be in your classpath. Is it?
On 5/18/06, Christian Haase <[EMAIL PROTECTED]> wrote:
Have done a run with -Dlog4j.debug, but doesn't helps me:
log4j: Trying to find [/work/fop/entwicklung/log4j.properties] using
context classloader [EMAIL PROTECTED]
log4j: Trying to find [/work/fop/entwicklung/log4j.properties] using
[EMAIL PROTECTED] class loader.
log4j: Trying to find [/work/fop/entwicklung/log4j.properties] using
ClassLoader.getSystemResource().
log4j: Could not find resource: [/work/fop/entwicklung/log4j.properties].
The path to log4j.poperties file is absolutely correct and the user the
java application runs with has authorization for reading the file.
I've no idea what's going wrong here. If you have any ideas, please let
me know!
Greetings,
Christian
James Stauffer schrieb:
> Run with -Dlog4j.debug and it should show you how it it trying to
> configure itself.
>
> On 5/17/06, Christian Haase <[EMAIL PROTECTED]> wrote:
>
>> Hi all!
>>
>> After a frustrating day without success I hope you can help me.
>> I've trouble running my Java-Apps at Suse Linux. On WinXP all works
>> fine.
>>
>> Problem description:
>> ===============
>>
>> Error:
>> log4j:WARN No appenders could be found for logger
>> (me.objects.Environment).
>> log4j:WARN Please initialize the log4j system properly.
>>
>>
>> My Java Source (Snippet):
>> public class XmlSplitter {
>> private static final org.apache.log4j.Logger logger =
>> org.apache.log4j.Logger.getLogger( XmlSplitter.class.getName() );
>> ...
>> public static void main( String[] args ) throws Exception
>> {
>> System.setProperty("log4j.file.name", "XmlSplitter");
>> // Only for debugging:
>> System.getProperties().list(System.out);
>> ....
>>
>> Produces following System.out:
>> -- listing properties --
>> java.runtime.name=Java(TM) 2 Runtime Environment, Stand...
>> sun.boot.library.path=/usr/lib/SunJava2-1.4.2/jre/lib/i386
>> java.vm.version=1.4.2_08-b03
>> java.vm.vendor=Sun Microsystems Inc.
>> java.vendor.url=http://java.sun.com/
>> path.separator=:
>> java.vm.name=Java HotSpot(TM) Client VM
>> file.encoding.pkg=sun.io
>> user.country=DE
>> sun.os.patch.level=unknown
>> java.vm.specification.name=Java Virtual Machine Specification
>> user.dir=/work
>> java.runtime.version=1.4.2_08-b03
>> java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
>> java.endorsed.dirs=/usr/lib/SunJava2-1.4.2/jre/lib/endorsed
>> os.arch=i386
>> java.io.tmpdir=/tmp
>> java.vm.specification.vendor=Sun Microsystems Inc.
>> os.name=Linux
>> sun.java2d.fontpath=
>> log4j.configuration=/work/fop/entwicklung/log4j.properties <--- Looks
>> right, or not?
>> java.library.path=/usr/lib/SunJava2-1.4.2/jre/lib/i386/...
>>
>>
>> Contents of my log4j.properties:
>> log4j.rootLogger=INFO, FILE, stdout
>> #### First appender writes to console
>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>> log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
>> # Error-Log in rollierendes ASCII-File, max. 1 MB:
>> log4j.appender.FILE=org.apache.log4j.RollingFileAppender
>> log4j.appender.FILE.File=/work/fop/entwicklung/log/${log4j.file.name}.log
>>
>> log4j.appender.FILE.MaxFileSize=1000KB
>> log4j.appender.FILE.MaxBackupIndex=3
>> log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
>> log4j.appender.FILE.layout.ConversionPattern=%d %p %l - %m%n
>> --
>>
>> Any ideas where the problem is?
>>
>> Greetings,
>> Christain
>>
>>
>> -------------------------------------
>> Christian Haase, Hans-Mertens-Str. 37
>> 30655 Hannover, GERMANY
>> Tel: +49-511-697916 / +49-178-7772617
>> Fax: +49-511-3948280
>> ICQ: 307628315
>> -------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
--
-------------------------------------
Christian Haase, Hans-Mertens-Str. 37
30655 Hannover, GERMANY
Tel: +49-511-697916 / +49-178-7772617
Fax: +49-511-3948280
ICQ: 307628315
-------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]