>> Don't think so. You have document() function somewhere,
>> and for some reason, Cocoon failed to resolve the document:
What I can't figure out is why the page renders at all! When I start up
Cocoon, my first request to the page works.
Then the next 1-3 requests return the null pointer exception, followed by 1
good request, then nulls again, then 1 good request, etc, etc, etc.
I'm requesting the exact same URL, which maps to the exact same matchers in
the sitemap, and iterates over exactly the same data each time 8-( Hence
why I thought it may have something to do with caching.
>> What cocoon version do you have?
Latest Binary Distribution.
>> Or, what is the version of the XSLTProcessorImpl class?
Uh... I didn't chance any source or configuration, other then switching
over to Saxon. To switch over I replaced the Xalan jars with Saxon 6.5.1
jars.
=-=-=-
After more extensive debugging, I'm seeing an error in the Cocoon error log
pointing at one of my XSL sheets -- but I'm not understanding the error.
I've included the error message, stack trace, and XSL sheet below.
Essentially what the style sheet does, is strip off the "xsp:page" node that
gets stuck into a page generated from an XSP page. Perhaps someone has a
better idea of how this can be done.
Thanks,
Mike
==========================
XSL sheet (strip_xsp.xsl)
-----
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://apache.org/xsp"
>
<xsl:template match="xsp:page">
<xsl:apply-templates select="./*"/>
</xsl:template>
<xsl:template match="@*|node()"
priority="-2"><xsl:copy><xsl:apply-templates
select="@*|node()"/></xsl:copy></xsl:template>
<xsl:template match="text()" priority="-1"><xsl:value-of
select="."/></xsl:template>
</xsl:stylesheet>
-----
==========================
Error message (placed in log even on successful rendering)
-----
ERROR (2002-05-06) 08:18.29:817 [core.xslt-processor]
(/cocoon/ogc/Item13.htm) HttpProcessor[8080][4]/TraxErrorHandler: Error in
TraxTransformer: file:/C:/tomcat4/webapps/cocoon/ogc/strip_xsp.xsl; Line 6;
Column -1;
; SystemID: file:/C:/tomcat4/webapps/cocoon/ogc/strip_xsp.xsl; Line#: 6;
Column#: -1
javax.xml.transform.TransformerConfigurationException: Attribute xmlns: is
not allowed on this element
at
com.icl.saxon.style.StyleElement.compileError(StyleElement.java:849)
at
com.icl.saxon.style.StyleElement.checkUnknownAttribute(StyleElement.java:208
)
at
com.icl.saxon.style.XSLStyleSheet.prepareAttributes(XSLStyleSheet.java:287)
at
com.icl.saxon.style.XSLStyleSheet.processAllAttributes(XSLStyleSheet.java:50
1)
at
com.icl.saxon.style.XSLStyleSheet.preprocess(XSLStyleSheet.java:351)
at
com.icl.saxon.PreparedStyleSheet.setStyleSheetDocument(PreparedStyleSheet.ja
va:176)
at
com.icl.saxon.TemplatesHandlerImpl.getTemplates(TemplatesHandlerImpl.java:70
)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:238)
at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:204)
at
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:
295)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:215)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:279)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:142)
at
org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java
:283)
at
org.apache.cocoon.components.source.SitemapSource.<init>(SitemapSource.java:
197)
at
org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSour
ceFactory.java:96)
at
org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandle
rImpl.java:176)
at
org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironmen
t.java:346)
at
org.apache.cocoon.generation.FileGenerator.setup(FileGenerator.java:103)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:202)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:279)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:142)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:320)
at
org.apache.cocoon.www.sitemap_xmap.matchd0e1599(C:\tomcat4\work\localhost\co
coon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:12344)
at
org.apache.cocoon.www.sitemap_xmap.process(C:\tomcat4\work\localhost\cocoon\
cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3919)
at
org.apache.cocoon.www.sitemap_xmap.process(C:\tomcat4\work\localhost\cocoon\
cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3127)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
at java.lang.Thread.run(Unknown Source)
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>