Found the problem.

When I got a callback from TIBCO and I spawn a new
thread to communicate with the RMI server I unknowingly
restarted the log4j configuration.  When this happened
from multiple threads at the same time it obviously caused
problems.

Thanks for your help anyway.

Aron.

----- Original Message -----
From: "Aron Kramlik" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 22, 2002 9:22 PM
Subject: Re: no logging when running multiple threads


> Mike,
>
> When the application starts log4j is initialised properly.
> I have done a test where I send a particular message
> through the server and it processes it correctly.  Then
> I send exactly the same message but three of them at
> a time.  This is when I can reproduce the log4j problem.
>
> So, the log files have been written to and all the classes
> that are used have also been initialised since the first run
> would have done that.  All Category objects are statics
> and there is only one JVM.
>
> I am using Linux (RedHat 6.2) and the IBM 1.3 JDK.
>
> What else can I try?
>
> BTW, thanks very much for your suggestions and pointers
> so far.
>
> Aron.
>
> ----- Original Message -----
> From: "Mike Brodhead" <[EMAIL PROTECTED]>
> To: "Log4J Users List" <[EMAIL PROTECTED]>
> Sent: Monday, January 21, 2002 6:39 PM
> Subject: Re: no logging when running multiple threads
>
>
> >
> > > log4j:ERROR Attempted to append to closed appender named
> > > [APPENDER_CONSOLE].
> > > log4j:WARN Not allowed to write to a closed appender.
> > > log4j:ERROR Attempted to append to closed appender named
[APPENDER_CMA].
> > > log4j:WARN Not allowed to write to a closed appender.
> >
> > Aaron,
> >
> > This seems in sync with what I would expect from a thread safety
> > problem.
> >
> > Can you confirm that the Log4j initialization happens properly?  Does
> > anything get written to the logs before the problem occurs?  If so,
> > then we can assume that the appender is somehow getting clobbered
> > later on.
> >
> > Static initializers are very convenient, but sometimes the
> > interactions can get hairy.  Just because you see those Categories
> > getting initialized in your source code does not mean the
> > initialization is actuall happening correctly.
> >
> > Is everything running in a single JVM?  Or might you have multiple
> > JVMs instantiating appenders that want to write to the same file(s)?
> > I haven't looked through that portion of the Log4j source yet, but it
> > is not unreasonable for an Appender to try for exclusive access to a
> > file, meaning that other Appenders would fail at startup.
> >
> > Go nuts with System.out.println and see what you find.
> >
> > --mkb
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
>
>


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

Reply via email to