You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tobia Conforto <to...@linux.it> on 2007/09/10 13:18:36 UTC

Problem with CInclude and nested exceptions

I'm currently experiencing an annoying problem where Cocoon does not log
exceptions generated by sub-pipelines called through CInclude.

Here is my setup: a pipeline (already nested in other calls) generates a
CInclude include element and passes it through the CInclude transformer.
The transformer invokes a sub-pipeline via a cocoon:/... url, which
executes a function or continuation call.  Now, if the flowscript raises
an exception, such as a runtime EcmaError, I can't see it anywhere!

Here is what I get instead:

Exception page title (notice that EcmaError isn't mentioned anywhere!)

  javax.xml.transform.TransformerException:
    javax.xml.transform.TransformerException:
      javax.xml.transform.TransformerException:
        Exception in CIncludeTransformer

Java full stacktrace (abridged)

  org.apache.cocoon.ProcessingException:
    Sitemap: error calling function 'B'
  Caused by:
    org.mozilla.javascript.WrappedException:
      Wrapped org.apache.cocoon.ProcessingException:
        Sitemap: error calling function 'A'
  Caused by:
    org.apache.cocoon.ProcessingException:
      Sitemap: error calling function 'A'
  Caused by:
    org.mozilla.javascript.WrappedException:
      Wrapped org.apache.cocoon.ProcessingException:
        Sitemap: error calling function 'C'
  Caused by:
    org.apache.cocoon.ProcessingException:
      Sitemap: error calling function 'C'
  Caused by:
    org.mozilla.javascript.WrappedException:
      Wrapped org.apache.cocoon.ProcessingException:
        Failed to process pipeline
  Caused by:
    org.apache.cocoon.ProcessingException:
      Failed to process pipeline
  Caused by:
    org.apache.commons.lang.exception.NestableRuntimeException:
      javax.xml.transform.TransformerException:
        javax.xml.transform.TransformerException:
          javax.xml.transform.TransformerException:
            Exception in CIncludeTransformer
  Caused by:
    javax.xml.transform.TransformerException:
      javax.xml.transform.TransformerException:
        javax.xml.transform.TransformerException:
          Exception in CIncludeTransformer

The included flowscript function that raises the error is neither A, B,
nor C.  Those are higher-level functions that call one another before
getting to the pipeline with the CInclude transformer.  Why their
presence should cause so much "exception noise" is beyond me.

Am I losing exceptions because of some nesting limit?  If that is so,
can I increase that limit?

Otherwise, how can I get the CInclude transformer to pass along the
exception, so that I can see why the inner pipeline is failing, at least
in the logs?

I don't recall having this problem before, so it could very well be that
I've reached a nesting limit.

Any help will be appreciated!


Tobia

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


Re: Problem with CInclude and nested exceptions

Posted by Joerg Heinicke <jo...@gmx.de>.
I remember a problem with exceptions/errors in flowscript swallowing the 
actual exception just like

try {
   ...
} catch (Exception e) {
   throw new Exception();
}

in Java.

Joerg

On 10.09.2007 13:18, Tobia Conforto wrote:

> I'm currently experiencing an annoying problem where Cocoon does not log
> exceptions generated by sub-pipelines called through CInclude.
> 
> Here is my setup: a pipeline (already nested in other calls) generates a
> CInclude include element and passes it through the CInclude transformer.
> The transformer invokes a sub-pipeline via a cocoon:/... url, which
> executes a function or continuation call.  Now, if the flowscript raises
> an exception, such as a runtime EcmaError, I can't see it anywhere!
> 
> Here is what I get instead:
> 
> Exception page title (notice that EcmaError isn't mentioned anywhere!)
> 
>   javax.xml.transform.TransformerException:
>     javax.xml.transform.TransformerException:
>       javax.xml.transform.TransformerException:
>         Exception in CIncludeTransformer
> 
> Java full stacktrace (abridged)
> 
>   org.apache.cocoon.ProcessingException:
>     Sitemap: error calling function 'B'
>   Caused by:
>     org.mozilla.javascript.WrappedException:
>       Wrapped org.apache.cocoon.ProcessingException:
>         Sitemap: error calling function 'A'
>   Caused by:
>     org.apache.cocoon.ProcessingException:
>       Sitemap: error calling function 'A'
>   Caused by:
>     org.mozilla.javascript.WrappedException:
>       Wrapped org.apache.cocoon.ProcessingException:
>         Sitemap: error calling function 'C'
>   Caused by:
>     org.apache.cocoon.ProcessingException:
>       Sitemap: error calling function 'C'
>   Caused by:
>     org.mozilla.javascript.WrappedException:
>       Wrapped org.apache.cocoon.ProcessingException:
>         Failed to process pipeline
>   Caused by:
>     org.apache.cocoon.ProcessingException:
>       Failed to process pipeline
>   Caused by:
>     org.apache.commons.lang.exception.NestableRuntimeException:
>       javax.xml.transform.TransformerException:
>         javax.xml.transform.TransformerException:
>           javax.xml.transform.TransformerException:
>             Exception in CIncludeTransformer
>   Caused by:
>     javax.xml.transform.TransformerException:
>       javax.xml.transform.TransformerException:
>         javax.xml.transform.TransformerException:
>           Exception in CIncludeTransformer
> 
> The included flowscript function that raises the error is neither A, B,
> nor C.  Those are higher-level functions that call one another before
> getting to the pipeline with the CInclude transformer.  Why their
> presence should cause so much "exception noise" is beyond me.
> 
> Am I losing exceptions because of some nesting limit?  If that is so,
> can I increase that limit?
> 
> Otherwise, how can I get the CInclude transformer to pass along the
> exception, so that I can see why the inner pipeline is failing, at least
> in the logs?
> 
> I don't recall having this problem before, so it could very well be that
> I've reached a nesting limit.
> 
> Any help will be appreciated!
> 
> 
> Tobia


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