On Wed, 27 Feb 2002 18:24, [EMAIL PROTECTED] wrote: > I think that it fails in createQueueConnection(), the code catches the > exception runs getErrorHandler() which then throws the NPE because the > error handler is not defined!
doh! > If you track through the code, the private variable ErrorHandler > m_errorHandler in AbstractTarget is never initialized. It is initialized as soon as the target is associated with a Hierarchy/Logger. See something like Logger.setupErrorHandlers() > I suspect the only way to resolve this sort of problem is to initialize the > field thus: > > private ErrorHandler m_errorHandler = new > org.apache.log.util.DefaultErrorHandler(); > > Has anyone else seen this problem? not in that case - I guess we really need to think of a good way to do this. Ideally open() should not be called until after it is attached to a Logger hierarchy but that is not really elegant. Maybe we could create a dummy error handler until it has been attached to Logger ? Anyone got any better ideas? -- Cheers, Pete --------------------------------------------------------------- The difference between genius, and stupidity? Genius has limits --------------------------------------------------------------- -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
