You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com> on 2002/09/25 01:20:39 UTC

[C2.1-CVS] Problem using 2 pipelines

The first pipeline get and XML -> XSLT -> XML

<map:match pattern="*-*.xml">
        <map:act type="auth-protect">
		    <map:parameter name="handler" value="agshandler"/>
              <map:match pattern="*-*.xml">
             <map:generate src="docs/{1}-{2}.xsp"/>
             <map:transform type="session"/>
             <map:serialize type="xml"/>
        </map:match>
      </map:act>
</map:match>

The second read from the first pipeline making an XSP tranformation:

<map:match pattern="*-*.html">
                    <map:generate src="cocoon://{1}-{2}.xml" 
type="serverpages" encoding="ISO-8859-1"/>
                    <map:transform src="stylesheets/agssa.xsl"/>
                    <map:serialize/>
                </map:match>

I call only this second pipeline, but It returns:

Exception during source resolving.

org.apache.cocoon.ProcessingException: Exception during source resolving.: 
org.apache.excalibur.source.SourceException: Exception during processing of 
cocoon://usr-cambiar.xml: org.apache.cocoon.ProcessingException: Failed to 
execute pipeline.: java.lang.NullPointerException


If I call directly the fisrt pipeline it returns me a valid XML file. What I 
am doing wrong?

Thanks in advance, 

Antonio Gallardo

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [C2.1-CVS] Problem using 2 pipelines

Posted by Tuomo Henrikki Lesonen <tu...@niksula.hut.fi>.
Hi Antonio!

I really tried to answer to your question about the auth-framework, but
couldn't connect to my mailserver at all! :( Now it works again... But it
seems that you're going through the same steps than I did a while ago.
(With my own help)

At this moment, the option of using 2 pipelines the way you are
doing, with the cocoon: pseudo-protocol doesn't work. This is due to
a major bug
in the cocoon component handling. It has been reported, but no actions
have been taken yet. BUT: There IS a way around this!

I have my authentication resource generated with XSP and ESQL (Username
and pwd are
checked against db, and user data is being returned in the
<authentication> section
of that generated resource). In addition, I added another line inside the
<authentication> section, which places the users ID in a session
attribute. Now it can be used in XSP later on.

<authentication>
  <ID><esql:get-int column="id"/></ID>
  <xsp-session:set-attribute><esql:get-int column="id"/></xsp-session:set-attribute>
</authentication>

Hope this helps.

-Tuomo

On Tue, 24 Sep 2002, Antonio Gallardo Rivera wrote:

> The first pipeline get and XML -> XSLT -> XML
>
> <map:match pattern="*-*.xml">
>         <map:act type="auth-protect">
> 		    <map:parameter name="handler" value="agshandler"/>
>               <map:match pattern="*-*.xml">
>              <map:generate src="docs/{1}-{2}.xsp"/>
>              <map:transform type="session"/>
>              <map:serialize type="xml"/>
>         </map:match>
>       </map:act>
> </map:match>
>
> The second read from the first pipeline making an XSP tranformation:
>
> <map:match pattern="*-*.html">
>                     <map:generate src="cocoon://{1}-{2}.xml"
> type="serverpages" encoding="ISO-8859-1"/>
>                     <map:transform src="stylesheets/agssa.xsl"/>
>                     <map:serialize/>
>                 </map:match>
>
> I call only this second pipeline, but It returns:
>
> Exception during source resolving.
>
> org.apache.cocoon.ProcessingException: Exception during source resolving.:
> org.apache.excalibur.source.SourceException: Exception during processing of
> cocoon://usr-cambiar.xml: org.apache.cocoon.ProcessingException: Failed to
> execute pipeline.: java.lang.NullPointerException
>
>
> If I call directly the fisrt pipeline it returns me a valid XML file. What I
> am doing wrong?
>
> Thanks in advance,
>
> Antonio Gallardo
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>