cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: NPE in AbstractCachingProcessingPipeline
Date Mon, 24 Feb 2003 14:20:18 GMT
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:stephan@apache.org]
> 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: stephan@apache.org
>          ICQ: 115535699                Tel: +49-030-314-21583
> ----+----|----+----|----+----|----+----|----+----|----+----|----+----|-|
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

Mime
View raw message