cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan" <>
Subject [C2] Right behavior regarding a SAXException in a Transformer
Date Mon, 11 Feb 2002 17:28:54 GMT

When a Transformer catches a SAXException and it rethrows it (or let's say it is produced
during an invocation of a SAX related function in the Transformers XMLConsumer and is not
explicitely catched) then the Generator get's a SAXException.. This leads to a log entry like:

org.apache.cocoon.ProcessingException: Could not read resource file:/foo.xml: java.util.NoSuchElementException

This is actually misleading for the problem was not to read the resource. Furthermore the
Transformer is not in the stack trace of the original message (see below) - nor of the ProcessingException
what I do not understand. It is responsible for the exception. I have tried to comment it
out and to replace it with another transformer and had no exception then. The browser get's
no feedback it seems and keeps "loading" until timeout.

How should I handle such an exception to avoid this?


 at org.apache.xerces.framework.XMLParser.parse(
 at org.apache.cocoon.components.parser.JaxpParser.parse(
 at org.apache.cocoon.components.source.URLSource.toSAX(
 at org.apache.cocoon.generation.FileGenerator.generate(
 at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(
 at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(
 at org.apache.cocoon.www.sitemap_xmap.matchN1022C(
 at org.apache.cocoon.www.sitemap_xmap.process(
 at org.apache.cocoon.www.sitemap_xmap.process(
 at org.apache.cocoon.sitemap.Handler.process(
 at org.apache.cocoon.sitemap.Manager.invoke(
 at org.apache.cocoon.sitemap.SitemapManager.process(
 at org.apache.cocoon.Cocoon.process(
 at org.apache.cocoon.servlet.CocoonServlet.service(
 at javax.servlet.http.HttpServlet.service(
 at org.apache.tomcat.facade.ServletHandler.doService(
 at org.apache.tomcat.core.Handler.service(
 at org.apache.tomcat.facade.ServletHandler.service(
 at org.apache.tomcat.core.ContextManager.internalService(
 at org.apache.tomcat.core.ContextManager.service(
 at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
 at org.apache.tomcat.util.threads.ThreadPool$

View raw message