cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject NPE during shutdown
Date Thu, 30 Oct 2003 16:38:42 GMT
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



Mime
View raw message