cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject NPE in AbstractCachingProcessingPipeline
Date Mon, 17 Feb 2003 16:28:00 GMT
Hi,

I got the following NPE in AbstractCachingProcessingPipeline class:
java.lang.NullPointerException
at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:562)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:501)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:467)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(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