Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 33600 invoked from network); 30 Oct 2003 20:01:00 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Oct 2003 20:01:00 -0000 Received: (qmail 8413 invoked by uid 500); 30 Oct 2003 20:00:47 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 8206 invoked by uid 500); 30 Oct 2003 20:00:46 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 8193 invoked from network); 30 Oct 2003 20:00:46 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 30 Oct 2003 20:00:46 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AFIyQ-0000i5-00 for ; Thu, 30 Oct 2003 21:00:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AFFos-0006TZ-00 for ; Thu, 30 Oct 2003 17:38:46 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AFFos-0002ce-00 for ; Thu, 30 Oct 2003 17:38:46 +0100 From: Vadim Gritsenko Subject: NPE during shutdown Date: Thu, 30 Oct 2003 11:38:42 -0500 Lines: 40 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Has anybody noticed an NPE during tomcat shutdown? I traced one down to this piece of code: Index: src/java/org/apache/cocoon/components/CocoonComponentManager.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/CocoonComponentManager.java,v retrieving revision 1.19 diff -u -r1.19 CocoonComponentManager.java --- src/java/org/apache/cocoon/components/CocoonComponentManager.java 21 Oct 2003 13:37:42 -0000 1.19 +++ src/java/org/apache/cocoon/components/CocoonComponentManager.java 30 Oct 2003 16:36:13 -0000 @@ -480,11 +480,18 @@ * Dispose */ public void dispose() { + // FIXME: Catch 22: Some components might hold unreleased Sources and + // when they try to release them by calling {@see #release}, + // this.sourceResolver will not be available anymore if ( null != this.sourceResolver ) { super.release( this.sourceResolver ); - this.sourceResolver = null; + // this.sourceResolver = null; } + super.dispose(); + + // FIXME: HACK! Added to overcome issue descrived above + this.sourceResolver = null; } /** I'd love somebody to comment on the issue... Carsten? :) Vadim