Grant,

my advice is to cut the pipeline just before the SQLTransformer step and see
what happens... copying node-sets IS tricky.

Best regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Miller, Grant [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 22, 2002 6:20 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [C2] Bug in SQL transformer?
>
>
> Ok, it turns out this is to do with copying in the xsl before the sql
> transformer.
> If I copy a node then the sql transform fails. If, in XSL, I match and
> output the same thing as the copy would have done(in other words, a
> hardcoded/manual copy) then it works fine.
> Is there something special about copying nodes...(sax events or
> something)?
> It fails both using the copy notation below and if I match on '*' and do
> copy-of "@*".
> I'm confused...
>
> -----Original Message-----
> From: Luca Morandini [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 22, 2002 1:09 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [C2] Bug in SQL transformer?
>
>
> Grant,
>
> I'd suggest to take a look at the cocoon.log, which contains a lot of
> information about errors.
>
> Aanyway, I've used SQLTransformer after XSLT stages have been performed (I
> generate tags embedding SP calls from stylesheets) and found no anomaly.
>
> Best regards,
>
> ---------------------------------------------
>                Luca Morandini
>                GIS Consultant
>               [EMAIL PROTECTED]
> http://utenti.tripod.it/lmorandini/index.html
> ---------------------------------------------
>
>
> > -----Original Message-----
> > From: Miller, Grant [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 22, 2002 1:15 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: [C2] Bug in SQL transformer?
> >
> >
> > Hello,
> > I've been trying to use the SQL transformer. However, if it
> comes after an
> > XSLT transformer in the pipeline it always throws an error. If I use the
> > output of the XSLT step as the hardcoded input from a generate
> step (e.g.
> > file generator) then it works fine. The crash happens whether or
> > not the XML
> > input to the sql transformer contains sql transform tags.
> > The example below is the simplest case I can find to illustrate
> > the problem.
> >
> > The pipeline:
> > <map:pipeline>
> >     <map:match pattern="testPage">
> >             <map:generate type="serverpages" src="test.xsp"/>
> >             <map:transform src="test/copy.xsl"/>
> >             <map:transform type="sql">
> >                             <map:parameter name="use-connection"
> > value="kpidbpool"/>
> >                     </map:transform>
> >             <map:serialize type="xml"/>
> >     </map:match>
> > </map:pipeline>
> >
> > Copy xsl:
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> >             version="1.0">
> >
> >     <xsl:template match="@*|node()" priority="-1">
> >             <xsl:copy>
> >                     <xsl:apply-templates select="@*|node()"/>
> >             </xsl:copy>
> >     </xsl:template>
> >
> > </xsl:stylesheet>
> >
> > Error info:
> >
> > org.apache.cocoon.ProcessingException: Exception in
> > ServerPagesGenerator.generate(): java.lang.RuntimeException:
> > java.lang.NullPointerException
> >     at
> > org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
> > agesGenera
> > tor.java:212)
> >     at
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.process
> > (CachingEv
> > entPipeline.java:210)
> >     at
> > org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
> > s(CachingS
> > treamPipeline.java:359)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(s
> > itemap_xma
> > p.java:528)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
> > ava:373)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
> > ava:331)
> >     at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
> >     at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xm
> > ap.java:33
> > 94)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
> >     at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
> >     at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
> >     at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
> >     at
> > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> > pplication
> > FilterChain.java:247)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> > onFilterCh
> > ain.java:193)
> >     at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> > erValve.ja
> > va:243)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(StandardConte
> > xtValve.ja
> > va:201)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 66)
> >     at
> > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
> > lve.java:2
> > 46)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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.StandardContext.invoke(StandardContext.ja
> > va:2344)
> >     at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> > e.java:164
> > )
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 66)
> >     at
> > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
> > cherValve.
> > java:170)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 64)
> >     at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
> > e.java:170
> > )
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 64)
> >     at
> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(StandardEngine
> > Valve.java
> > :163)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(HttpProce
> > ssor.java:
> > 1011)
> >     at
> > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
> > .java:1106
> > )
> >     at java.lang.Thread.run(Thread.java:484)
> > java.lang.RuntimeException: java.lang.NullPointerException
> >     at
> > org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.j
> > ava:3174)
> >     at
> > org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(Tr
> > ansformerH
> > andlerImpl.java:433)
> >     at
> > org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.
> > java:48)
> >     at
> > org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.
> > java:48)
> >     at
> > org.apache.cocoon.generation.ServerPagesGenerator.endDocument(Serv
> > erPagesGen
> > erator.java:270)
> >     at
> > org.apache.cocoon.www.renderer.test.test_xsp.generate(test_xsp.java:149)
> >     at
> > org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
> > agesGenera
> > tor.java:200)
> >     at
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.process
> > (CachingEv
> > entPipeline.java:210)
> >     at
> > org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
> > s(CachingS
> > treamPipeline.java:359)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(s
> > itemap_xma
> > p.java:528)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
> > ava:373)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
> > ava:331)
> >     at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
> >     at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xm
> > ap.java:33
> > 94)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
> >     at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
> >     at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
> >     at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
> >     at
> > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> > pplication
> > FilterChain.java:247)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> > onFilterCh
> > ain.java:193)
> >     at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> > erValve.ja
> > va:243)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(StandardConte
> > xtValve.ja
> > va:201)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 66)
> >     at
> > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
> > lve.java:2
> > 46)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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.StandardContext.invoke(StandardContext.ja
> > va:2344)
> >     at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> > e.java:164
> > )
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 66)
> >     at
> > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
> > cherValve.
> > java:170)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 64)
> >     at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
> > e.java:170
> > )
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 64)
> >     at
> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(StandardEngine
> > Valve.java
> > :163)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(HttpProce
> > ssor.java:
> > 1011)
> >     at
> > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
> > .java:1106
> > )
> >     at java.lang.Thread.run(Thread.java:484)
> >
> > Original exception : java.lang.RuntimeException:
> > java.lang.NullPointerException
> >     at
> > org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.j
> > ava:3174)
> >     at
> > org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(Tr
> > ansformerH
> > andlerImpl.java:433)
> >     at
> > org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.
> > java:48)
> >     at
> > org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.
> > java:48)
> >     at
> > org.apache.cocoon.generation.ServerPagesGenerator.endDocument(Serv
> > erPagesGen
> > erator.java:270)
> >     at
> > org.apache.cocoon.www.renderer.test.test_xsp.generate(test_xsp.java:149)
> >     at
> > org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerP
> > agesGenera
> > tor.java:200)
> >     at
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.process
> > (CachingEv
> > entPipeline.java:210)
> >     at
> > org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
> > s(CachingS
> > treamPipeline.java:359)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.wildcardMatchN400032(s
> > itemap_xma
> > p.java:528)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
> > ava:373)
> >     at
> > org.apache.cocoon.www.renderer.sitemap_xmap.process(sitemap_xmap.j
> > ava:331)
> >     at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
> >     at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.wildcardMatchN400235(sitemap_xm
> > ap.java:33
> > 94)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2620)
> >     at
> > org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2511)
> >     at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
> >     at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
> >     at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
> >     at
> > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> > pplication
> > FilterChain.java:247)
> >     at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> > onFilterCh
> > ain.java:193)
> >     at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> > erValve.ja
> > va:243)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(StandardConte
> > xtValve.ja
> > va:201)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 66)
> >     at
> > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
> > lve.java:2
> > 46)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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.StandardContext.invoke(StandardContext.ja
> > va:2344)
> >     at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> > e.java:164
> > )
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 66)
> >     at
> > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
> > cherValve.
> > java:170)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 64)
> >     at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
> > e.java:170
> > )
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.java:5
> > 64)
> >     at
> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(StandardEngine
> > Valve.java
> > :163)
> >     at
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> > ine.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(HttpProce
> > ssor.java:
> > 1011)
> >     at
> > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
> > .java:1106
> > )
> >     at java.lang.Thread.run(Thread.java:484)
> >
> > Thanks for any help,
> >
> > Grant Miller
> >
> > This message may contain privileged and/or confidential
> > information.  If you
> > have received this e-mail in error or are not the intended
> recipient, you
> > may not use, copy, disseminate or distribute it; do not open any
> > attachments, delete it immediately from your system and notify
> the sender
> > promptly by e-mail that you have done so.  Thank you.
> >
> > ---------------------------------------------------------------------
> > 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]>
> >
>
>
> ---------------------------------------------------------------------
> 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]>
>
> This message may contain privileged and/or confidential
> information.  If you
> have received this e-mail in error or are not the intended recipient, you
> may not use, copy, disseminate or distribute it; do not open any
> attachments, delete it immediately from your system and notify the sender
> promptly by e-mail that you have done so.  Thank you.
>
> ---------------------------------------------------------------------
> 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]>
>


---------------------------------------------------------------------
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]>

Reply via email to