RE: Intercepting exceptions in cocoon?
Thanks everyone - that's exactly what I need :) Ant -Original Message- From: Ralph Goers [mailto:[EMAIL PROTECTED] Sent: 26 October 2006 15:07 To: users@cocoon.apache.org Subject: Re: Intercepting exceptions in cocoon? Have you looked at http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html? Antony Grinyer wrote: Hi all, In version 1 of our application we returned exceptions wrapped in XML so we could pass the XML down the pipeline and handle the messages gracefully using XSLT. In version 2 of our application we do not return our exceptions wrapped in XML (it is a requirement not to) therefore when we throw an exception now, cocoon shows the horrible stack trace. So may question is: is there a way to intercept the exception before cocoon can report it? Can cocoon generators intercept exceptions so we could write our own generator? Maybe there is a simple answer to this already (apologies if so)? Thx in advance Ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Handling non XML structures in pipelines?
Hi all, Our scenario is simple, we have a service that returns some strings in a comma delimited format and wed like to use that data in cocoon for various transformations, however is it possible to do something at the generator stage to convert this string into XML or does the source of the generator (e.g. file, stream) have to be in an XML format in the first place i.e. editing our service application to return XML is the only option? I guess what were asking is whether cocoon can handle non XML formatted data? We do not want our service to depend on the client as to what structure we return, such as XML. Many thanks in advance, Ant
RE: Re: Handling non XML structures in pipelines?
Thanks for all the help everyone - much appreciated - we're going to adapt the CSVGenerator generator to our needs. Thanks again, Ant -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bertrand Delacretaz Sent: 22 September 2006 14:29 To: users@cocoon.apache.org Subject: Re: Re: Handling non XML structures in pipelines? On 9/22/06, Jason Johnston [EMAIL PROTECTED] wrote: ...In fact there's already a CSVGenerator which you could use or adapt to your needs... Also, the Chaperon block provides a text parser where you can configure your own grammar. The syntax is not much fun, but it works well for structured text input. -Bertrand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Passing XML to webservice?
Hi, In the sitemap, how do you pass the XML produced from a transformer onto an external web service: map:match pattern=create_order map:generate src=""> map:transform src=""> SEND TO WEBSERVICE HERE! /map:match Many thanks in advance, Ant
Substitute whitespace in request parameters in sitemap?
Hi, Is there any way to substitute whitespace with '%20' in a URL within the sitemap? I am passing in basic Xqueries containing spaces as a request parameter to my sitemap (from an HTML page, not from XSL so I cannot use the strip whitespace attribute); however, as the xqueries contain spaces the URL becomes malformed when the sitemap attempts to call the URL? Any ideas gratefully welcome. Thanks a lot, Ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Substitute whitespace in request parameters in sitemap?
Sorted - needed to use 'url-encode' on my parameters in the sitemap. Ant -Original Message- From: Antony Grinyer [mailto:[EMAIL PROTECTED] Sent: 16 January 2006 11:10 To: users@cocoon.apache.org Subject: Substitute whitespace in request parameters in sitemap? Hi, Is there any way to substitute whitespace with '%20' in a URL within the sitemap? I am passing in basic Xqueries containing spaces as a request parameter to my sitemap (from an HTML page, not from XSL so I cannot use the strip whitespace attribute); however, as the xqueries contain spaces the URL becomes malformed when the sitemap attempts to call the URL? Any ideas gratefully welcome. Thanks a lot, Ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon shutdown listener?
Hi, Is there anything in cocoon that can be used to invoke a Java class (maybe via an act?) at shutdown i.e. such as a shutdown listener? We have a webapp application which must clean up the application (e.g. close open objects) if cocoon is shut down unexpectedly. Thanks, Ant CSW Group Ltd. winmail.dat- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Memory profiling cocoon
Hi, Has anyone successfullyintegrated a Java memory profiler (such as JProfiler or YourKit) with Cocoon? I'd like to test the memory usage of aCocoon transformer that is a Java class, but I'm not sure how I can get thea Javaprofiler to profile Cocoon transformers? Thanks for any help/advice, Ant
RE: Memory profiling cocoon
Thanks Reinhard...I'll give it a go! Ant -Original Message- From: Reinhard Poetz [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 07:52 pm To: users@cocoon.apache.org Subject: Re: Memory profiling cocoon Antony Grinyer wrote: Hi, Has anyone successfully integrated a Java memory profiler (such as JProfiler or YourKit) with Cocoon? I'd like to test the memory usage of a Cocoon transformer that is a Java class, but I'm not sure how I can get the a Java profiler to profile Cocoon transformers? Yes. I successfully use Yourkit with Cocoon. See :doYourkitProfile in http://svn.apache.org/repos/asf/cocoon/trunk/cocoon.bat to find out how to start Jetty. Of course this requires a properly installed Yourkit (IIRC it requires some native library in the system path). With this setting you can the JVM access remotly at port 1. Hope this helps. -- Reinhard Pötz Independent Consultant, Trainer (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cocoon hangs?
Hi, I have a simple webapp that uses a cocoon transformer to interact with a DB XML database. I find that the browser hangs intermittently when running the webapp, then I find this message in the sitemap.log: [sitemap] (Unknown-URI) Unknown-thread/ExcaliburComponentManager: disposing of handler for unreleased component. role [org.apache.cocoon.serialization.SerializerSelector] Has anyone come across this before? I've restarted Cocoon and this message always appears when the webapp hangs? Any help gratefully appreciated. Thanks Ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Memory monitor?
Can anyone recommend a decent memory monitor for Cocoon? I've implemented a Java class transformer which runs queries against a native XML database (DB XML). We've noticed a lot of memory gets eaten and not freed when running the transformer to execute queries. I've waded through the code and made sure all the usual re-initialisation and freeing up of objects is enforced, and we know it's not at the database end as we've run queries using the database shell command line app...it's definitely an issue in the Cocoon transformer we believe. Any recommendations please? Thanks in advance, Ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XSLT transformation
Thanks to everyone's help I believe I'm getting closer to getting this working...darn...I didn't realize transforming XML in Cocoon could cause such a problem! I've now changed my code to: private void generateDocumentToSAX(String queryResults) { try { XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler(this); InputSource inputSource = new InputSource(new StringReader(queryResults)); parser.parse(inputSource); } catch(Exception e) { m_resultMessage = Unable to get parser: + e.toString(); this.getLogger().error(m_resultMessage); } } And I get this error in the sitemap.log: Unable to get parser: java.lang.UnsupportedOperationException: The TransformerHandler is not serially reusable. The startDocument() method must be called once only. - I think this might be happening because I pass in XML to the java class transformer (containing the above method) which finds/creates the startDocument element in the startElement method, and then the parser in the method above creates another startDocument element, which is confusing the saxon xslt transformer? I'm confused here now - if the purpose of a Cocoon transformer is to take in some XML, change it, then spit out the changed XML, why are the xlst (saxon, xalan) transformers complaining about duplicated startDocument elements? Sure you can use a parser to create Sax events within a transformer java class which extends the AbstractSAXTransformer class? Thanks again, Ant -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 05 August 2005 08:08 am To: users@cocoon.apache.org Subject: Re: XSLT transformation snip/ Conal Tuohy wrote: Upayavira wrote: Your transformer is passing something down the pipeline as null. This isn't tripping up the XML serializer, but is tripping up the xslt transformer. Go through each of the startElement, etc, calls within your transformer looking at the output. See if you can see any nulls in there. e.g. there is a null passed as the value of a namespace URI to AttributesImpl.addAttribute If the namespace URI is null it should be represented by the empty string () not java null. Hah. Thanks for that. I suspected it was something simple like that. Confuses XSLT transformers, but the XMLSerializer is okay with it. Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XSLT transformation
[setDocumentLocator] systemid=null,publicid=null [startDocument] [startElement] uri=,local=containers,raw=containers [startElement] uri=,local=container,raw=container [startElement] uri=,local=name,raw=name [characters] Sample [endElement] uri=,local=name,raw=name [startElement] uri=,local=filename,raw=filename [characters] Sample.bdbxm [characters] l [endElement] uri=,local=filename,raw=filename [startElement] uri=,local=docnamepath,raw=docnamepath [characters] /publication/metadata/title [endElement] uri=,local=docnamepath,raw=docnamepath [startElement] uri=,local=paramsearchconfig,raw=paramsearchconfig [startElement] uri=,local=context,raw=context [] 1. uri=,local=xpath,qname=xpath,type=CDATA,value=/publication/chapter [characters] Chapter [endElement] uri=,local=context,raw=context [startElement] uri=,local=context,raw=context [] 1. uri=,local=xpath,qname=xpath,type=CDATA,value=/publication/chapter/section [characters] Section [endElement] uri=,local=context,raw=context [startElement] uri=,local=context,raw=context [] 1. uri=,local=xpath,qname=xpath,type=CDATA,value=/publication/chapter/section/para [characters] Paragraph [endElement] uri=,local=context,raw=context [endElement] uri=,local=paramsearchconfig,raw=paramsearchconfig [endElement] uri=,local=container,raw=container [endElement] uri=,local=containers,raw=containers [endDocument] [endElement] uri=,local=result,raw=result [endElement] uri=,local=bdbxml-transaction,raw=bdbxml-transaction [endDocument] Could this exception be Xalan related? I'm using jdk 1.4.2, however I have copied across the xalan and xerces jars into the jre/lib/endorsed directory as recommended by the Cocoon installations. Should I try JDK 1.5? Strange thing is I've been able to do basic tranformation on other XML using the file generator passed onto XSLT stylesheets (as opposed my java transformer bdbxml). Any ideas? It's driving me mad! Thanks, Ant -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 04 August 2005 08:57 am To: users@cocoon.apache.org Subject: Re: XSLT transformation Antony Grinyer wrote: Hi, A have a simple sitemap entry as below: map:match pattern=listcontainers map:generate type=file src=content/showsyscontainer.xml/ map:transform type=bdbxml/ map:transform type=xslt src=style/xsl/containerslist.xsl/ map:serialize type=html/ /map:match The generator is a simple XML file which is passed to a java class transformer ( referenced as type=bdbxml) which returns XML results. This all works fine if I use map:serialize type=xml/ to simply output the XML, however if I try to transform the XML output with the XSLT transformer above I get an error: Error executing pipeline. org.apache.cocoon.ProcessingException: Error executing pipeline.: java.lang.RuntimeException I know the XSLT containerslist.xsl is correct as I've tried it against some sample output XML in XMLSpy, but it appears that when I add this XSLT transformer I get a Processing Exception? In the sitemap.log it is reported as: Unable to get parser: java.lang.RuntimeException: java.lang.NullPointerException Do you get any stack trace with this NPE? Your transformer is passing something down the pipeline as null. This isn't tripping up the XML serializer, but is tripping up the xslt transformer. Go through each of the startElement, etc, calls within your transformer looking at the output. See if you can see any nulls in there. Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: Thu 8/4/2005 8:57 AM To: users@cocoon.apache.org Subject: Re: XSLT transformation Antony Grinyer wrote: Hi, A have a simple sitemap entry as below: map:match pattern=listcontainers map:generate type=file src=content/showsyscontainer.xml/ map:transform type=bdbxml/ map:transform type=xslt src=style/xsl/containerslist.xsl/ map:serialize type=html/ /map:match The generator is a simple XML file which is passed to a java class transformer ( referenced as type=bdbxml) which returns XML results. This all works fine if I use map:serialize type=xml/ to simply output the XML, however if I try to transform the XML output with the XSLT transformer above I get an error: Error executing pipeline. org.apache.cocoon.ProcessingException: Error executing pipeline.: java.lang.RuntimeException I know the XSLT containerslist.xsl is correct as I've tried it against some sample output XML in XMLSpy, but it appears that when I add this XSLT transformer I get a Processing Exception? In the sitemap.log it is reported as: Unable to get parser: java.lang.RuntimeException: java.lang.NullPointerException Do you get any stack trace with this NPE
RE: XSLT transformation
Thanks for your help Upayavira, I'm using Cocoon 2.1.7, however I'll try downloading a subversion client. I've attached the transformer Java class. Basically is takes an XML file which represents a query instruction. This query instruction is processed and is used to communicate with BDB XML containers. The queries return a standard XML file which should then be passed down the pipeline...as I mentioned it seems to output the XML correctly, but falls over when passed to an XSLT transformation. Any help would be 'greatly' appreciate...got to get this working today :-( -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 04 August 2005 11:16 am To: users@cocoon.apache.org Subject: Re: XSLT transformation Try upgrading to the latest Cocoon 2.1.X from Subversion. There are some improvements there that get around a tendency of Xalan to swallow exceptions. You've got a NullPointerException happening, but there's no mention of it in your stacktrace, so you're looking in the wrong place for it. Download a subversion client (tortoisesvn.tigris.org if you're on windows is good), then point it at http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X. You may well get better answers out of it. I still lean towards the problem being in your transformer. Can you post some of the code for that here? Regards, Upayavira Antony Grinyer wrote: The stack trace returned is: ERROR (2005-08-04) 09:46.59:112 [sitemap.handled-errors] (/kde/listcontainers) PoolThread-4/ErrorHandlerHelper: Error executing pipeline. org.apache.cocoon.ProcessingException: Error executing pipeline.: java.lang.RuntimeException at org.apache.cocoon.components.pipeline.AbstractProcessingPipeli ne.handleException(AbstractProcessingPipeline.java:940) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProc essingPipeline.processXMLPipeline(AbstractCachingProcessingPip eline.java:281) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeli ne.process(AbstractProcessingPipeline.java:483) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invok e(SerializeNode.java:120) snip Caused by: java.lang.RuntimeException at org.apache.xalan.transformer.TransformerImpl.run(TransformerIm pl.java:3418) at org.apache.xalan.transformer.TransformerHandlerImpl.endDocumen t(TransformerHandlerImpl.java:389) at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLP ipe.java:55) at org.apache.cocoon.transformation.TraxTransformer.endDocument(T raxTransformer.java:560) at org.apache.cocoon.transformation.LogTransformer.endDocument(Lo gTransformer.java:156) at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLP ipe.java:55) at org.apache.cocoon.transformation.AbstractSAXTransformer.endDoc ument(AbstractSAXTransformer.java:296) at org.apache.cocoon.components.sax.XMLTeePipe.endDocument(XMLTee Pipe.java:67) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknow n Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknow n Source) at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDisp atcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu ment(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:296) at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315) The XML generated by map:transform type=bdbxml/ is very simple: ?xml version=1.0 encoding=ISO-8859-1 ? bdbxml-transaction transactiontype=retrieve containername=System.bdbxml docname=syscontainer.xml result status=passed containers container nameSample/name filenameSample.bdbxml/filename docnamepath/publication/metadata/title/docnamepath paramsearchconfig context xpath=/publication/chapterChapter/context context xpath=/publication/chapter/sectionSection/context context xpath=/publication/chapter/section/paraParagraph/context /paramsearchconfig /container /containers /result /bdbxml-transaction
RE: XSLT transformation
I seem to have got a bit further with this issue. I think it's a Xalan problem so I configured Cocoon to use Saxon instead which gives me a bit more error detail during the transformation:INFO (2005-08-04) 18:50.52:052 [sitemap] (/kde/showsyscontainer) PoolThread-4/BDBXMLTransformer: Transformer InitialisedINFO (2005-08-04) 18:50.52:130 [sitemap] (/kde/showsyscontainer) PoolThread-4/HandleErrorsNode: Processing handle-errors at file:/C:/cocoon-2.1.7/build/webapp/kde/sitemap.xmap:85:23WARN (2005-08-04) 18:50.52:318 [sitemap.serializer.html] (/kde/showsyscontainer) PoolThread-4/AbstractTextSerializer: Cannot know if transformer needs namespaces attributes - assuming NO.org.xml.sax.SAXException: Saxon requires an XML parser that reports the QName of each elementThe code that generates the XMLthat ispassed to the saxon XSLT transformer is:private void generateDocumentToSAX(String queryResults) { SAXParser parser = null; try { parser = (SAXParser)this.manager.lookup(SAXParser.ROLE); InputSource inputSource = new InputSource(new StringReader(queryResults)); parser.parse(inputSource, super.xmlConsumer); } catch(Exception e) { m_resultMessage = "Unable to get parser: " + e.toString(); this.getLogger().error(m_resultMessage); } finally { if (parser != null) this.manager.release(parser); } }Do I need to inform the parser in the code to do something to stop this error below? WHat is the QName? 'Cannot know if transformer needs namespaces attributes - assuming NO.org.xml.sax.SAXException: Saxon requires an XML parser that reports the QName of each element' Thanks, Ant -Original Message----- From: Antony Grinyer [mailto:[EMAIL PROTECTED]] Sent: 04 August 2005 11:32 am To: users@cocoon.apache.org Subject: RE: XSLT transformation Thanks for your help Upayavira, I'm using Cocoon 2.1.7, however I'll try downloading a subversion client. I've attached the transformer Java class. Basically is takes an XML file which represents a query instruction. This query instruction is processed and is used to communicate with BDB XML containers. The queries return a standard XML file which should then be passed down the pipeline...as I mentioned it seems to output the XML correctly, but falls over when passed to an XSLT transformation. Any help would be 'greatly' appreciate...got to get this working today :-( -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED]] Sent: 04 August 2005 11:16 am To: users@cocoon.apache.org Subject: Re: XSLT transformation Try upgrading to the latest Cocoon 2.1.X from Subversion. There are some improvements there that get around a tendency of Xalan to swallow exceptions. You've got a NullPointerException happening, but there's no mention of it in your stacktrace, so you're looking in the wrong place for it. Download a subversion client (tortoisesvn.tigris.org if you're on windows is good), then point it at http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X. You may well get better answers out of it. I still lean towards the problem being in your transformer. Can you post some of the code for that here? Regards, Upayavira Antony Grinyer wrote: The stack trace returned is: ERROR (2005-08-04) 09:46.59:112 [sitemap.handled-errors] (/kde/listcontainers) PoolThread-4/ErrorHandlerHelper: Error executing pipeline. org.apache.cocoon.ProcessingException: Error executing pipeline.: java.lang.RuntimeException at org.apache.cocoon.components.pipeline.AbstractProcessingPipeli ne.handleException(AbstractProcessingPipeline.java:940) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProc essingPipeline.processXMLPipeline(AbstractCachingProcessingPip eline.java:281) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeli ne.process(AbstractProcessingPipeline.java:483) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invok e(SerializeNode.java:120) snip Caused by: java.lang.RuntimeException at org.apache.xalan.transformer.TransformerImpl.run(TransformerIm pl.java:3418) at org.apache.xalan.transformer.TransformerHandlerImpl.endDocumen t(TransformerHandlerImpl.java:389) at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLP ipe.java:55) at org.apache.cocoon.transformation.TraxTransformer.endDocument(T raxTransformer.java:560) at org.apache.cocoon.transformation.LogTransformer.endDocument(Lo gTransformer.java:156) at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLP ipe.java:55) at org.apache.cocoon.transformation.AbstractSAXTransformer.endDoc ument(AbstractSAXTransformer.java:296) at org.apache.cocoon.components.sax.XMLTeePipe.endDocument(XMLTee Pipe.java:67) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknow n Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknow
RE: XSLT transformation
Thanks for the idea Mark - I tried this and it just displays the XML? Seems it's stopping at the map:serialize type=xml/ and not moving onto map:transform type=xslt src=style/xsl/containerslist.xsl/? Thanks, Ant -Original Message- From: Marc Salvetti [mailto:[EMAIL PROTECTED] Sent: 03 August 2005 06:26 pm To: users@cocoon.apache.org Subject: Re: XSLT transformation You can just try the following pipe map:match pattern=listcontainers map:generate type=file src=content/showsyscontainer.xml/ map:transform type=bdbxml/ map:serialize type=xml/ map:transform type=xslt src=style/xsl/containerslist.xsl/ map:serialize type=html/ /map:match if you get the same error, the pb is in the java class, if not, it's in the stylesheet :) Marc Antony Grinyer a écrit : Hi, A have a simple sitemap entry as below: map:match pattern=listcontainers map:generate type=file src=content/showsyscontainer.xml/ map:transform type=bdbxml/ map:transform type=xslt src=style/xsl/containerslist.xsl/ map:serialize type=html/ /map:match The generator is a simple XML file which is passed to a java class transformer ( referenced as type=bdbxml) which returns XML results. This all works fine if I use map:serialize type=xml/ to simply output the XML, however if I try to transform the XML output with the XSLT transformer above I get an error: Error executing pipeline. org.apache.cocoon.ProcessingException: Error executing pipeline.: java.lang.RuntimeException I know the XSLT containerslist.xsl is correct as I've tried it against some sample output XML in XMLSpy, but it appears that when I add this XSLT transformer I get a Processing Exception? In the sitemap.log it is reported as: Unable to get parser: java.lang.RuntimeException: java.lang.NullPointerException Any ideas please? (for a Cocoon newbie) Thx in advance, Ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XSLT transformation
Thanks Jorn - I tried commenting out almost everything in the stylesheet and I still get the error...back to the drawing board. Thanks, Ant -Original Message- From: Jörn Heid [mailto:[EMAIL PROTECTED] Sent: 03 August 2005 05:56 pm To: users@cocoon.apache.org Subject: Re: XSLT transformation Just remember that XML Spy does not use the same XSLT transformer as Cocoon. I think there is an error in your stylesheet. Try to comment out some parts of it to find the lines which causes the error. JOERN Antony Grinyer schrieb: Hi, A have a simple sitemap entry as below: map:match pattern=listcontainers map:generate type=file src=content/showsyscontainer.xml/ map:transform type=bdbxml/ map:transform type=xslt src=style/xsl/containerslist.xsl/ map:serialize type=html/ /map:match The generator is a simple XML file which is passed to a java class transformer ( referenced as type=bdbxml) which returns XML results. This all works fine if I use map:serialize type=xml/ to simply output the XML, however if I try to transform the XML output with the XSLT transformer above I get an error: Error executing pipeline. org.apache.cocoon.ProcessingException: Error executing pipeline.: java.lang.RuntimeException I know the XSLT containerslist.xsl is correct as I've tried it against some sample output XML in XMLSpy, but it appears that when I add this XSLT transformer I get a Processing Exception? In the sitemap.log it is reported as: Unable to get parser: java.lang.RuntimeException: java.lang.NullPointerException Any ideas please? (for a Cocoon newbie) Thx in advance, Ant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Simple question
Hi All, Being relatively new to Cocoon can I ask a simple question - how do you simply invoke a java class in a Cocoon pipeline without having to generate, transform, etc. any XML? Is it just an action? Thanks in advance :) AG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple question
Hi Upayavira, Thanks for replying. I simply want to invoke a servlet which lists lots of debug information about our current environment (e.g. application context and DB related configs). It's just a starter to ensure all the expected environment parameters are correct. Thanks, AG -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 01:31 pm To: users@cocoon.apache.org Subject: Re: Simple question Antony Grinyer wrote: Hi All, Being relatively new to Cocoon can I ask a simple question - how do you simply invoke a java class in a Cocoon pipeline without having to generate, transform, etc. any XML? Is it just an action? Thanks in advance :) What part do you want this java invocation to play in the pipeline? There are a number of ways you can do it, but it depends upon what you're trying to do. Can you give us a bit more of your use case? Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple question
Thanks Ron, I'll take a look. Upayavira - I have little experience with Cocoon so I cannot comment on a better Cocoon oriented way yet. The servlet itself will eventually be invoked from HTML forms and will do things such as authentication and queries to databases - so I just needed to know how to call this servlet correctly in a pipeline. Thanks, AG -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 01:56 pm To: users@cocoon.apache.org Subject: Re: Simple question Antony Grinyer wrote: Hi Upayavira, Thanks for replying. I simply want to invoke a servlet which lists lots of debug information about our current environment (e.g. application context and DB related configs). It's just a starter to ensure all the expected environment parameters are correct. Okay. So how would that servlet interact with the rest of Cocoon? Does it need to be called via doGet(), i.e. does it need an HTTPRequest and HTTPResponse to be working with? Also, what does it expect to do with its output? Do you just want to write that to the logs, or have Cocoon output it? Would you consider a more Cocoon oriented way of achieving the same effect? Sorry to keep asking questions! Regards, Upayavira -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 01:31 pm To: users@cocoon.apache.org Subject: Re: Simple question Antony Grinyer wrote: Hi All, Being relatively new to Cocoon can I ask a simple question - how do you simply invoke a java class in a Cocoon pipeline without having to generate, transform, etc. any XML? Is it just an action? Thanks in advance :) What part do you want this java invocation to play in the pipeline? There are a number of ways you can do it, but it depends upon what you're trying to do. Can you give us a bit more of your use case? Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple question
Just had a look in Cocoon 2.1.7 - doesn't seem to have the status.html example? Thanks Ant -Original Message- From: Ron Wheeler [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 01:53 pm To: users@cocoon.apache.org Subject: Re: Simple question Is there an example in the samples that gets this type of information anddisplays it? http://localhost:8080/cocoon/samples/status.html Antony Grinyer wrote: Hi Upayavira, Thanks for replying. I simply want to invoke a servlet which lists lots of debug information about our current environment (e.g. application context and DB related configs). It's just a starter to ensure all the expected environment parameters are correct. Thanks, AG -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 01:31 pm To: users@cocoon.apache.org Subject: Re: Simple question Antony Grinyer wrote: Hi All, Being relatively new to Cocoon can I ask a simple question - how do you simply invoke a java class in a Cocoon pipeline without having to generate, transform, etc. any XML? Is it just an action? Thanks in advance :) What part do you want this java invocation to play in the pipeline? There are a number of ways you can do it, but it depends upon what you're trying to do. Can you give us a bit more of your use case? Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple question
Ahh, found it thanks (bare with a Cocoon newbie here) Still doesn't show how I invoke a servlet in the sitemap though :-( Sorry for being dumb. Thanks AG -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 02:37 pm To: users@cocoon.apache.org Subject: Re: Simple question Antony Grinyer wrote: Just had a look in Cocoon 2.1.7 - doesn't seem to have the status.html example? http://localhost:/samples/status.html works for me. Go to http://localhost:, click on samples, then, in the middle, on the right, you'll see System Tools and Pages. Beneath that is status page. Have you built Cocoon with samples included? Upayavira -Original Message- From: Ron Wheeler [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 01:53 pm To: users@cocoon.apache.org Subject: Re: Simple question Is there an example in the samples that gets this type of information anddisplays it? http://localhost:8080/cocoon/samples/status.html Antony Grinyer wrote: Hi Upayavira, Thanks for replying. I simply want to invoke a servlet which lists lots of debug information about our current environment (e.g. application context and DB related configs). It's just a starter to ensure all the expected environment parameters are correct. Thanks, AG -Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Sent: 02 August 2005 01:31 pm To: users@cocoon.apache.org Subject: Re: Simple question Antony Grinyer wrote: Hi All, Being relatively new to Cocoon can I ask a simple question - how do you simply invoke a java class in a Cocoon pipeline without having to generate, transform, etc. any XML? Is it just an action? Thanks in advance :) What part do you want this java invocation to play in the pipeline? There are a number of ways you can do it, but it depends upon what you're trying to do. Can you give us a bit more of your use case? Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]