Return-Path: Delivered-To: apmail-jakarta-avalon-dev-archive@apache.org Received: (qmail 41538 invoked from network); 27 Feb 2002 07:31:20 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by 63.251.56.142 with SMTP; 27 Feb 2002 07:31:20 -0000 Received: (qmail 647 invoked by uid 97); 27 Feb 2002 07:31:30 -0000 Delivered-To: qmlist-jakarta-archive-avalon-dev@jakarta.apache.org Received: (qmail 618 invoked by uid 97); 27 Feb 2002 07:31:29 -0000 Mailing-List: contact avalon-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon Developers List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-dev@jakarta.apache.org Received: (qmail 593 invoked from network); 27 Feb 2002 07:31:29 -0000 From: Subject: Logkit: NullPointerException in JMSQueueTarget constructor To: "Avalon Developers List" X-Mailer: Lotus Notes Release 5.0.5 September 22, 2000 Message-ID: Date: Wed, 27 Feb 2002 18:24:14 +1100 X-MIMETrack: Serialize by Router on HIC-CO-SMTP-1/SRV/HIC(Release 5.0.9 |November 16, 2001) at 27/02/2002 18:27:30 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: 63.251.56.142 1.6.2 0/1000/N X-Spam-Rating: 63.251.56.142 1.6.2 0/1000/N We are getting a NPE in the above class when attempting to instantiate the class. What we think is causing the instantiation to fail is that the Server (in this case Websphere) does not have authorization to access JMS (actually MQ Series under that). The failing code is in "openConnection()" which looks like this: protected synchronized void openConnection() { try { m_connection = m_factory.createQueueConnection(); m_connection.start(); m_session = m_connection.createQueueSession( false, Session.AUTO_ACKNOWLEDGE); m_sender = m_session.createSender( m_queue ); } catch( final Exception e ) { getErrorHandler().error( "Error starting connection", e, null ); } } 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! If you track through the code, the private variable ErrorHandler m_errorHandler in AbstractTarget is never initialized. 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? **************************************************************** NOTICE - This message is intended only for the use of the addressee named above and may contain privileged and confidential information. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action based upon it. If you received this message in error please notify HIC immediately. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of HIC. **************************************************************** -- To unsubscribe, e-mail: For additional commands, e-mail: