cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <je...@media.demon.co.uk>
Subject error response broken?
Date Mon, 25 Mar 2002 20:20:23 GMT
Dear All,

I have noticed a big change in the way Cocoon responds to errors caused by
you putting mal-formed xml into a field in <slash-edit/>.

Up until a week ago (I got a bit behind CVS) Cocoon would respond with a
normal message like:

Original exception : org.xml.sax.SAXParseException: The element type
"title" must be terminated by the matching end-tag "</title>".

etc.

Now it says things like:

Original exception : java.io.FileNotFoundException:
/Users/jermq/Library/TomCat/webapps/cocoon/stylesheets/simple-page2html.xsl
(No such file or directory)

Which is strange.

So I looked at the logs, from WEB-INF/logs/access.log I came across this :

(my apologies for this mess, I have taken off the timings etc from each line)




AbstractEnvironment: Changing Cocoon context
AbstractEnvironment:   from
context(file:/Users/jermq/Library/TomCat/webapps/cocoon/) and prefix()
AbstractEnvironment:   to context(sitemap.xmap) and prefix()
AbstractEnvironment:   at URI mount/editor/edit/pre(alpha)
AbstractEnvironment: New context is
file:/Users/jermq/Library/TomCat/webapps/cocoon/
AbstractEnvironment: Changing Cocoon context
AbstractEnvironment:   from
context(file:/Users/jermq/Library/TomCat/webapps/cocoon/) and prefix()
AbstractEnvironment:   to context(mount/editor/) and prefix(mount/editor)
AbstractEnvironment:   at URI mount/editor/edit/pre(alpha)
AbstractEnvironment: New context is
file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/
AbstractEnvironment: Changing Cocoon context
AbstractEnvironment:   from
context(file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/) and
prefix(mount/editor/)
AbstractEnvironment:   to context(editor.xmap) and prefix(edit)
AbstractEnvironment:   at URI edit/pre(alpha)
AbstractEnvironment: New context is
file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/
AbstractEnvironment: Resolving 'editor/docs/alpha-config.xml' in context
'file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/'
AbstractEnvironment: Resolved to
'file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/editor/docs/alpha-config.xml'
AbstractEnvironment: Resolving 'cocoon:/content-pre(alpha,)' in context
'file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/'
AbstractEnvironment: Resolved to
'cocoon://mount/editor/edit/content-pre(alpha,)'
AbstractEnvironment: Resolving 'editor/stylesheets/editor-page2html.xsl' in
context 'file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/'
AbstractEnvironment: Resolved to
'file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/editor/stylesheets/editor-page2html.xsl'
HttpEnvironment: Response wasn't reset


Up to here it seems quite normal, the pipeline has failed because of the
StreamGenerator not parsing the xml, right?

But what happens next is really strange:


AbstractEnvironment: Resolving
'context://stylesheets/system/error2html.xsl' in context
'file:/Users/jermq/Library/TomCat/webapps/cocoon/mount/editor/'
AbstractEnvironment: Resolved to
'jndi:/localhost/cocoon/stylesheets/system/error2html.xsl'
AbstractEnvironment: Set the URI Prefix (OLD=mount/editor/edit/,
NEW=mount/editor/)
AbstractEnvironment: Reset context to
file:/Users/jermq/Library/TomCat/webapps/cocoon/
AbstractEnvironment: Resolving 'docs/edit/pre(alpha).xml' in context


What is it suddenly doing this for?


'file:/Users/jermq/Library/TomCat/webapps/cocoon/'
AbstractEnvironment: Resolved to
'file:/Users/jermq/Library/TomCat/webapps/cocoon/docs/edit/pre(alpha).xml'
AbstractEnvironment: Resolving 'stylesheets/simple-page2html.xsl' in
context 'file:/Users/jermq/Library/TomCat/webapps/cocoon/'
AbstractEnvironment: Resolved to
'file:/Users/jermq/Library/TomCat/webapps/cocoon/stylesheets/simple-page2html.xsl'
HttpEnvironment: Response wasn't reset


Not surprising .....


AbstractEnvironment: Resolving
'context://stylesheets/system/error2html.xsl' in context
'file:/Users/jermq/Library/TomCat/webapps/cocoon/'
AbstractEnvironment: Resolved to
'jndi:/localhost/cocoon/stylesheets/system/error2html.xsl'
AbstractEnvironment: Set the URI Prefix (OLD=mount/editor/, NEW=)
AbstractEnvironment: Reset context to
file:/Users/jermq/Library/TomCat/webapps/cocoon/
AbstractEnvironment: Set the URI Prefix (OLD=, NEW=)
AbstractEnvironment: Reset context to
file:/Users/jermq/Library/TomCat/webapps/cocoon/


So now I am getting the wrong error .....


INFO    (2002-03-25) 19:21.08:076   CocoonServlet:
'mount/editor/edit/pre(alpha)' Processed by Apache Cocoon 2.0.2-dev in
1.011 seconds.


You can replicate it by running <slash-edit/> and making a new file in the
Alpha Editor, then make the new XML invalid and submit.


Any ideas what might have got changed to cause this?
It seems like the sitemap is getting lost ;)

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pager:jermq@vizzavi.net>

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


Mime
View raw message