Hi Ian,

Just now saw this thread about the ugly 404 error page & logs in DSpace 
XMLUI / Cocoon.

You may already be aware of when/why this came about. But, I figured I'd 
fill in some "history" just in case you (or others) are not.

Essentially, prior to DSpace 1.8.x, DSpace XMLUI actually had a nicer 
looking XMLUI "Page Not Found" Error page. It just simply said "page not 
found" and looked like every other page in your XMLUI theme.

However, then we discovered that Apache Cocoon was responding with "200 
OK" on *every error page* in the XMLUI, see this ticket
https://jira.duraspace.org/browse/DS-768

Essentially, the only resolution we were able to come up with was to 
actually patch Apache Cocoon to throw the proper 404 error. So we 
created a patched copy of the Cocoon code which was throwing 200 instead 
of 404.  That patched code is maintained here: 
https://github.com/DSpace/dspace-cocoon-servlet-service-impl

Unfortunately though, in our patching of this Cocoon bug, we were not 
able to get our nicer looking "Page Not Found" error page to display 
again...instead, we were left with the ugly error page you see now. 
That patch to Cocoon may have also been the cause of the messages you 
are seeing in the Cocoon.log.

There may be ways to fix this & clean up both the "Page Not Found" error 
page and limit the output in the Cocoon.log. I haven't looked into it in 
some time. But, if you find anything that works for you, I'd highly 
encourage you to send us a Pull Request or a patch -- I think this is 
something we'd all like to see fixed.

Not sure if this info will be of help. But, at least know you know the 
full story of where this issue began.

- Tim

On 12/12/2012 3:42 AM, Ian Boston wrote:
> On 12 December 2012 20:15, helix84 <[email protected]> wrote:
>> Hi Ian,
>>
>> I don't know about shortening the stacktrace, but that's a pretty
>> generic Java question so you may try googling around.
>
> I dont think there is a way other than changing the Cocoon code,
> blocking the logger or not throwing the exception and setting a 404
> status code in the Dspace code. I might just do the latter.
>
>>
>> To answer at least a part of your question, this is where 404s are
>> handled in Cocoon. You may want to edit the XSL to filter what you
>> send to the user for specific exceptions and leave the rest (the
>> unexpected ones) as stacktraces.
>>
>> https://github.com/DSpace/DSpace/blob/dspace-3_x/dspace-xmlui/src/main/webapp/sitemap.xmap#L673
>>
>
> Ok, thanks for the pointer.
>
> Ian
>
>
>>
>> Regards,
>> ~~helix84
>>
>> Compulsory reading: DSpace Mailing List Etiquette
>> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette: 
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to