cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject [heads up!] new error handling fails weirdly!
Date Sun, 06 Apr 2003 21:58:42 GMT
I've updated cvs today and rebuilt my cocoon. I'm following gump-mode
and I'm crazily developing the web site I'm working on against
Cocoon-2.1 HEAD and I'm updating every week or so. I'm basically
debugging cocoon along with my work.

Anyway, today I updated cvs and recompiled. I relaunched and all went
well. But then, during development, I got:

  Request Processing Failed

  Message: Cocoon engine failed in process the request

  Description: The processing engine failed to process the request.
  This could be due to lack of matching or bugs in the pipeline engine.

This is the infamous "cocoon confusion" error that I recently updated to
a more friendly message.

Still, the problem remain: the above is the most cryptical error message
we can give to our developer.

Yes, *developer*. I normally expect to see important error information
*directly* in my browser window before I freeze my site and I build it
for production.

I normally even use an 'IP selector' in my error handling pipeline so
that I can still get useful stacktraces from localhost or from my
subnetwork.

Anyway, the above message suggests me to look into the sitemap for a
mismatch.... but after careful looking, there is none.

Hmmmm, so I get suspicious and open up the logs and *holy cow* I have
300Kb of error.log for a few reloads!!! what's going on? I open it up
and I get:

 ERROR   (2003-04-06) 23:28.10:671   [sitemap] (/admin/index)
PoolThread-3/PipelineNode: Error notifier is unable to notify the
problem. Please check the logs. In the default webapp, look in the
WEB-INF/logs dir.
org.apache.cocoon.ProcessingException: Incomplete pipeline :
'handle-error' without a 'type' must include a generator, at
file:/Users/stefano/Code/ormaz/sito/sitemap.xmap:554:24
Either add a generator (preferred) or a type='500' attribute
(deprecated) on 'handle-errors'
	at
org.apache.cocoon.components.treeprocessor.sitemap.HandleErrorsNode.invoke(HandleErrorsNode.java:103)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invokeErrorHandler(PipelineNode.java:218)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:178)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:143)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:640)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1103)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
	at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
	at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
	at org.mortbay.http.HttpServer.service(HttpServer.java:863)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:773)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:937)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:790)
	at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
FATAL_E (2003-04-06) 23:28.10:674   [access] (/admin/index)
PoolThread-3/CocoonServlet: The Cocoon engine failed to process the request.

Despite the stacktrace, the messages I get are:

1) "Error notifier is unable to notify the problem. Please check the
logs. In the default webapp, look in the WEB-INF/logs dir."

Ah, thanks, that helps. I am *already* looking into the logs! If the
error notifier was unable to notify the problem, how in hell am I
suppose to see this message if not directly from WEB-INF/logs?

These are things that really trash our usability as they get *extremely*
irritating. Cocoon should never appear *dumb* and this is clearly the
case here.

2) org.apache.cocoon.ProcessingException: Incomplete pipeline :
'handle-error' without a 'type' must include a generator, at
file:/Users/stefano/Code/ormaz/sito/sitemap.xmap:554:24
Either add a generator (preferred) or a type='500' attribute
(deprecated) on 'handle-errors'

Wait a second!

Deprecation doesn't mean that it's suddently gone!

This error is basically saying that my sitemap *requires* modification
in order to run! This means that Cocoon 2.1-dev it's currently *NOT*
transparently back compatible with 2.0.x!!!!

Please confirm because if so, this is a *very* serious issue.

I'm not against the ability to be able to specify a custom generator in
the error-handling pipeline, but I don't want to witness a flood of

 why my sitemap doesn't work?

messages on the various mail lists, with the automatic perception that
cocoon 2.1 is *yet another* revolutionary step and this is something we
have to make all possible efforts to avoid.

Migration *must* be smooth. And smooth, means: install, move my stuff
over and enjoy. period. That's it.

The only thing that will be tollerated are small issues, those that
require a change in one or two places.

this is a change that requires potentially *tens* of sitemaps to be
updated. This is simply too much of a change for a smooth transition and
for something that should be considered 'deprecated' not simply removed.

So, a few issues *must* be resolved:

 1) error handling *must* be totally back compatible. It's ok if a
warning is written in the log, but the processing should not fail.

 2) the sitemap processing should try to provide more reasonable error
messages in case something like this goes wrong and the tree processor
isn't able to process.

Thoughts?

-- 
Stefano.



Mime
View raw message