Yep, again this same ol' NPE from SourceResolver:

WARN (2004-05-17) 08:56.47:010 [core.manager] (Unknown-URI) Unknown-thread/ThreadSafeComponentHandler: Error decommissioning component: org.apache.cocoon.components.treeprocessor.TreeProcessor
java.lang.NullPointerException
at org.apache.excalibur.source.impl.SourceResolverImpl.release(SourceResolverImpl.java:285)
at org.apache.cocoon.components.CocoonComponentManager.release(CocoonComponentManager.java:507)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.dispose(TreeProcessor.java:514)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:345)
at org.apache.avalon.excalibur.component.DefaultComponentFactory.decommission(DefaultComponentFactory.java:336)
at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.dispose(ThreadSafeComponentHandler.java:165)
at org.apache.avalon.excalibur.component.ExcaliburComponentManager.dispose(ExcaliburComponentManager.java:621)
at org.apache.cocoon.components.CocoonComponentManager.dispose(CocoonComponentManager.java:468)
at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:345)
at org.apache.cocoon.Cocoon.dispose(Cocoon.java:499)
...



And, looking at the source of CocoonComponentManager, seems it had one workaround for it, which does not work (at least to the extent needed) now:


   public void dispose() {
       if(getLogger().isDebugEnabled()) {
           getLogger().debug("CocoonComponentManager.dispose() called");
       }

if ( null != this.sourceResolver ) {
super.release( this.sourceResolver );
// We cannot null out sourceResolver here yet as some other not
// disposed yet components might still have unreleased sources,
// and they will call [EMAIL PROTECTED] #release(Source)} during their
// dispose().
}
super.dispose();
// All components now are released so sourceResolver should be not
// needed anymore.
this.sourceResolver = null;


       // This is used to track bug 27249
       this.wasDisposed = true;
   }


I've got two options now...
1) Hack Excalibur... Not sure yet why it's failing, have not seen source yet.
2) Hack CocoonComponentManager... Add catch for NPE and log ERROR or WARN - this is another work around, but at least it will not interrupt dispose() of the component who called release().



PS This is Cocoon samples webapp

Vadim



Reply via email to