Hi Stephan,

thanks for reporting this. I think the test is correct, but an
extra null check is missing. I will add this asap and commit it.

Thanks
Carsten 

Carsten Ziegeler 
Open Source Group, S&N AG


> -----Original Message-----
> From: Stephan Michels [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 17, 2003 5:28 PM
> To: cocoon-dev
> Subject: NPE in AbstractCachingProcessingPipeline
> 
> 
> Hi,
> 
> I got the following NPE in AbstractCachingProcessingPipeline class:
> java.lang.NullPointerException
> at
> org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessi
> ngPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:562)
> at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.p
> reparePipeline(AbstractProcessingPipeline.java:501)
> at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.p
> rocess(AbstractProcessingPipeline.java:467)
> at
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.i
> nvoke(SerializeNode.java:145)
> 
> Code:
>  if (i > 0 && i > this.fromCacheKey.size()) {
>     // shorten key
>     for(int m=i; m < this.toCacheSourceValidities.length; m++) {
>         this.toCacheKey.removeLastKey();
>         if (!this.cacheCompleteResponse) {
>             this.firstNotCacheableTransformerIndex--;
>         }
>         this.cacheCompleteResponse = false;
>     }
>     SourceValidity[] copy = new SourceValidity[i];
>     System.arraycopy(this.toCacheSourceValidities, 0,
>                      copy, 0, copy.length);
>     this.toCacheSourceValidities = copy;
>     len = this.toCacheSourceValidities.length;
>  } else {
> 
> It seems to me that this.toCacheKey.size() should be used instead
> of this.fromCacheKey.size().
> 
> The exception occurs in the chaperon samples, if I use
>     <map:transform type="lexer"   src="cocoon:/quote.xlex"/>
>     <map:transform type="parser"  src="cocoon:/quote.xgrm"/>
> instead of
>     <map:transform type="lexer"   src="grammars/quote.xlex"/>
>     <map:transform type="parser"  src="grammars/quote.xgrm"/>
> 
> BTW, this pipeline must be complete cacheable.
> 
> Carsten any hints?
> 
> Stephan Michels.
> 
> _______________________________________________________________________
>          Stephan Michels               EMail: [EMAIL PROTECTED]
>          ICQ: 115535699                Tel: +49-030-314-21583
> ----+----|----+----|----+----|----+----|----+----|----+----|----+----|-|
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

Reply via email to