cocoon-users mailing list archives

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

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?

Cheers,
Jan

____________
 
java.util.NoSuchElementException
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1111)
 at org.apache.cocoon.components.parser.JaxpParser.parse(JaxpParser.java:182)
 at org.apache.cocoon.components.source.URLSource.toSAX(URLSource.java:331)
 at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:109)
 at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:209)
 at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:355)
 at org.apache.cocoon.www.sitemap_xmap.matchN1022C(sitemap_xmap.java:1738)
 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1515)
 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:1421)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:180)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:127)
 at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:144)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:582)
 at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:795)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java)
 at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:500)
 at org.apache.tomcat.core.Handler.service(Handler.java:223)
 at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:448)
 at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:788)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:701)
 at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:143)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:424)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:497)
 at java.lang.Thread.run(Thread.java:484)

Mime
View raw message