cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Van Kets <b...@vankets.com>
Subject sunShine fails to create session context
Date Tue, 19 Mar 2002 10:24:24 GMT
When trying to get the sunShine example running I get an error. :(  I guess 
I'm missing something in my sitemap, but can't find it.

My platform:
Win2K server SP2
SDK 1.3.1_01
Tomcat 4.0.1
Cocoon 2.0.2-dev CVS build with scratchpad of March 7th

Here's my XML file:
<resource xmlns:sunshine="http://cocoon.apache.org/sunshine/1.0">
<sunshine:createcontext name="trackdemo"/>
<!-- build context data -->
<sunshine:setxml context="trackdemo" path="/">
  <context>
   <users>
    <user id="1">
    <name>Carsten</name>
    </user>
   </users>
  </context>
</sunshine:setxml>
<sunshine:getxml context="trackdemo" path="/"/>
</resource>

Here's the sitemap pipeline:
    <map:match pattern="*.xml">
      <map:generate src="docs/{1}.xml" />
      <map:transform type="sunShine"/>
      <map:serialize type="xml" />
    </map:match>

The other sunShine related sitemap entries:
     <map:transformer name="sunShine" 
src="org.apache.cocoon.sunshine.transformation.SunShineTransformer"/>
     <map:transformer name="sunShinePre" 
src="org.apache.cocoon.sunshine.transformation.SunShinePreTransformer"/>
     <map:transformer name="sunShinePost" 
src="org.apache.cocoon.sunshine.transformation.SunShinePostTransformer"/>
     <map:transformer name="sunShineInsert" 
src="org.apache.cocoon.sunshine.transformation.InsertTransformer"/>
    <map:action name="sunShine-session" 
src="org.apache.cocoon.sunshine.acting.SessionAction"/>

The error:
org.apache.cocoon.ProcessingException: Could not read resource 
file:/C:/tomcat/webapps/bvar/docs/test.xml: 
java.lang.IllegalArgumentException: sunShine.createContext: Session is 
required

Stacktrace:
org.apache.cocoon.ProcessingException: Could not read resource 
file:/C:/tomcat/webapps/bvar/docs/test.xml: 
java.lang.IllegalArgumentException: sunShine.createContext: Session is 
required
at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:155)
at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:251)


at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:398)


at org.apache.cocoon.www.sitemap_xmap.matchN102DC(sitemap_xmap.java:2553)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1572)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1431)
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:976)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)


at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)


at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) 

at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 

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.java:201) 

at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 

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:566) 

at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) 

at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 

at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 

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:566) 

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)
java.lang.IllegalArgumentException: sunShine.createContext: Session is 
required
at org.apache.cocoon.sunshine.SunShine.createContext(SunShine.java:426)
at 
org.apache.cocoon.sunshine.transformation.SunShinePreTransformer.startTransformingElement(SunShinePreTransformer.java:223)


at 
org.apache.cocoon.sunshine.transformation.SunShinePostTransformer.startTransformingElement(SunShinePostTransformer.java:232)


at 
org.apache.cocoon.sunshine.transformation.AbstractSunShineTransformer.startElement(AbstractSunShineTransformer.java:378)


at 
org.apache.cocoon.sunshine.transformation.SunShinePreTransformer.startElement(SunShinePreTransformer.java:202)


at 
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118)
at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:445) 

at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:216)


at 
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:829)


at 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:590) 

at 
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:829) 

at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)


at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1454)


at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)


at 
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:525)


at 
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:581)


at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1157)
at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:241)
at 
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:204)


at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:142)
at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:251)


at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:398)


at org.apache.cocoon.www.sitemap_xmap.matchN102DC(sitemap_xmap.java:2553)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1572)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1431)
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:976)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)


at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)


at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) 

at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 

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.java:201) 

at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 

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:566) 

at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) 

at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 

at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 

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:566) 

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)


SunRise runs perfectly, but I can't seem to access the session context 
using the sunShine transformer.

Thanks for the help,
Bert


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message