cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Olson <tol...@marketingforce.com>
Subject NPE While Redirecting
Date Mon, 20 Oct 2003 21:29:02 GMT
we get a NullPointerException for any <redirect-to> that gets called in our
subsitemap.  i presume this is because a <generate type="file"> has been
called, but we must use the "cocoon:" protocol in order to divide our
pipeline into a main pipe which calls down into page-specific fragments.  no
"actual" generation has happened before the redirect.
is this NPE fixable?  if not, how else can we organize our pipelines into
per-page sitemaps?  resources don't work because they can't be called from a
subsitemap.
using cocoon 2.1.2


MAIN SITEMAP:
<map:match pattern="xsl/*/*/*.html">
	<map:generate src="cocoon:/fullPipe/{1}/{2}/{3}"/>
	<map:serialize type="html"/>
</map:match>

<map:match pattern="fullPipe/*/*/*">
      <!-- configure our proprietary framework by touching the
           "config" cocoon action -->
	<map:act type="config"/>

      <!-- call into the subsitemap to perform page/action
           specific actions and xsl transforms. -->
      <map:generate src="cocoon:/subsitemap/{1}/{2}/{3}"/>

	<!-- apply banner -->
      <map:transform src="{global:xsl-root}/general/banner.xsl"
label="banner">
        <map:parameter name="domain-id" value="{1}"/>
      </map:transform>

	<!-- internationalization -->
	<map:act type="locale">
		<map:transform type="i18n" label="i18n">
			<map:parameter name="locale" value="{locale}"/>
		</map:transform>
	</map:act>

</map:match>


<map:match pattern="subsitemap/*/*/*">
	<map:mount check-reload="yes"
src="{global:xsl-root}/common/{2}/{2}.xmap" uri-prefix="subsitemap"/>
</map:match>


SUBSITEMAP:

<match pattern="*/*/pageSpecificPipe">
    <redirect-to uri="..."/>
</match>


Original Exception: java.lang.NullPointerException
	at
org.apache.cocoon.environment.AbstractEnvironment.release(AbstractEnvironmen
t.java:521)
	at
org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade.release(Mutab
leEnvironmentFacade.java:332)
	at
org.apache.cocoon.components.source.impl.SitemapSource.reset(SitemapSource.j
ava:495)
	at
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.j
ava:480)
	at
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:224)
	at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:141)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:532)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:196)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:683)
	at
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.j
ava:467)
	at
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:224)
	at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:141)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:548)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:196)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:492)
	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:147)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:163)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:161)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:351)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:304)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:640)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1104)

Mime
View raw message