Hi Carsten, I'm using a version from a couple of months ago. I'll get the latest and try it again and let you know.
While I have your attention, I've asked another question a couple of days ago about getting parameter values from the request. Could you take a look at it, I'm pasting it below: Hi, I'm looking for help in how to extract parameter values using SessionTransformer. My uri looks like this: myaction?item=1&item=2&item=3 The SessionTransformer generates the following path: <parametervalues> cinclude:parameters> <cinclude:parameter> <cinclude:name>item</cinclude:name> <cinclude:value>1</cinclude:value> </cinclude:parameter> </cinclude:parameters> </parametervalues> My goal is to turn this into the following xml: <items> <item>1</item> <item>2</item> <item>3</item> </items> Two questions: 1. SessionTransformer javadoc says: This output has the namespace of the CIncludeTransformer to use it as input for a <cinclude:includexml> command. I don't quite understand how I would make use of CIclude transformer. 2. I've tried doing the following: <items xmlns:session="http://cocoon.apache.org/session/1.0" xmlns:cinclude="http://apache.org/cocoon/include/1.0"> <session:getxml xmlns:cinclude="http://apache.org/cocoon/include/1.0" context="request" path="/parametervalues/cinclude:parameters/cinclude:parameter[cinclude:name='item']/cinclude:value"/> </items> So that I could later transform it to the xml I need, but I get the following error: "Prefix must resolve to a namespace: cinclude" Thanks, -Alex P.S. And the stack: org.apache.cocoon.ProcessingException: TransformerException: javax.xml.transform.TransformerException: Prefix must resolve to a namespace: cinclude: javax.xml.transform.TransformerException: Prefix must resolve to a namespace: cinclude at org.apache.cocoon.webapps.session.context.RequestSessionContext.streamXML(RequestSessionContext.java:635) at org.apache.cocoon.webapps.session.components.SessionManager.streamContextFragment(SessionManager.java:559) at org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.startTransformingElement(SessionPreTransformer.java:191) at org.apache.cocoon.webapps.session.transformation.SessionPostTransformer.startTransformingElement(SessionPostTransformer.java:230) at org.apache.cocoon.transformation.AbstractSAXTransformer.startElement(AbstractSAXTransformer.java:333) at org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.startElement(SessionPreTransformer.java:162) at org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118) at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:454) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:217) at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:873) at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:590) at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:777) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1453) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524) at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169) at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:264) at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:215) at org.apache.excalibur.xmlizer.impl.TextXMLizer.toSAX(TextXMLizer.java:44) at org.apache.excalibur.xmlizer.impl.AbstractXMLizer.toSAX(AbstractXMLizer.java:102) at org.apache.excalibur.xmlizer.impl.XMLizerImpl.toSAX(XMLizerImpl.java:94) at org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.java:537) at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:140) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:273) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:143) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:131) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:166) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:143) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308) at org.apache.cocoon.Cocoon.process(Cocoon.java:595) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1034) 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:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:484) --- Carsten Ziegeler <[EMAIL PROTECTED]> wrote: > Hi, > > did you test the latest cvs version, because line > 380 in > my source code cannot cause your problem? > > Carsten > > > -----Original Message----- > > From: Alex Romayev [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 23, 2003 1:38 AM > > To: [EMAIL PROTECTED] > > Subject: Portal bug? - Using SessionTransformer > inside coplets > > > > > > I've run into a strange problem. It seems like > using > > SessionTransormer inside a coplet results in > > java.lang.NullPointerException. > > > > Here is what I found: > > 1. If I run my coplet by invoking the coplet's uri > > directly everything works as expected. > > 2. If I invoke the coplet as part of a portal page > > using portal fw, it generates the exception. > > 3. I'm using session:getxml statements to get > > information from "request" context. If I replace > > these statements with "dummy" data and _not_ have > any > > of the session statements (I still have > > SessionTransformer in my pipeline, even though it > > doesn't actually do anything), everything works > fine. > > > > So it seems that for some reason using > sesion:getxml > > from request context (or possibly other contexts > -- I > > haven't tried) causes the excetion. > > > > Please help, as this is a critical piece of my > work! > > > > Thanks, > > -Alex > > > > Here is the stack trace: > > ERROR (2003-01-22) 16:21.37:297 > > [core.portal-manager] > > (/cocoon/romayev/admin/write-result) > > Thread-8/CopletThread: Exception during processing > of > > coplet: write-result > > org.apache.cocoon.ProcessingException: Failed to > > execute pipeline.: java.lang.NullPointerException > > at > > > org.apache.cocoon.components.source.impl.SitemapSource.toSAX(Sitem > > apSource.java:380) > > at > > > org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEn > > vironment.java:532) > > at > > > org.apache.cocoon.webapps.portal.components.CopletThread.run(Cople > > tThread.java:218) > > at java.lang.Thread.run(Thread.java:484) > > > > > > > --------------------------------------------------------------------- > > Please check that your question has not already > been answered in the > > FAQ before posting. > <http://xml.apache.org/cocoon/faq/index.html> > > > > To unsubscribe, e-mail: > <[EMAIL PROTECTED]> > > For additional commands, e-mail: > <[EMAIL PROTECTED]> > > > > --------------------------------------------------------------------- > Please check that your question has not already > been answered in the > FAQ before posting. > <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: > <[EMAIL PROTECTED]> > For additional commands, e-mail: > <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>