> On Mar 15, 2010, at 2:10 PM, Yury Luneff wrote:

>>> Hi,
>>
>>> Have you overrided the ExceptionReport or even  
>>> ExceptionRequestHandler ?
>>
>>> Regards,
>>> Christophe Cordenier.
>>
>> in security module from tapestry5.localhost.nu ()there is:
>> @InjectService("SpringSecurityExceptionFilter")
>>            final SpringSecurityExceptionTranslationFilter  
>> springSecurityExceptionFilter)
>>
>> where public class SpringSecurityExceptionTranslationFilter extends
>>        SpringSecurityFilter
>>
>> as today i have turned off this module in a whole and the problem
>> persists, it is probably not the source of problem. Even if it is,
>> security there checks logged user if he can read logs and puts error
>> message otherwise and i don't receive any error message, just null.
>>
>> In my project i haven't touched anything related to expectionreport
>> and such by myself and if i had, it would be the first place i watch
>> for fixes.
>>


> Yury,

> I think that something is catching the exceptions and not rendering  
> anything. Do you have any custom filters? My understanding is that  
> this anti-pattern will break exception reporting in a filter:

> try {
>    return handler.service(request, response);
> } catch (Exception e) {
>    log.debug("i just silently broke something", e)
>    //@bug: here, exception caught!
> }
i think i had exactly that (no servlet api knowledge, i'm stupid, i'm 
ok with it):
public RequestFilter buildTimingFilter(final Logger logger) {
        return new RequestFilter() {
            public boolean service(Request request, Response response, 
RequestHandler handler) throws IOException {
                long startTime = System.currentTimeMillis();
                boolean successful = true;

                try {
                    // The responsibility of a filter is to invoke the 
corresponding method
                    // in the handler. When you chain multiple filters 
together, each filter
                    // received a handler that is a bridge to the next filter.
                    successful = handler.service(request, response);
                } finally {
                    long elapsed = System.currentTimeMillis() - startTime;

                    if (!successful) {
                        logger.error(String.format("%s not found", 
request.getPath()));
                    } else {
                        logger.info(
                                String.format(
                                        "Request time: %d ms for %s",
                                        elapsed,
                                        request.getPath()));
                    }
                    return successful;
                }
            }
        };
    }





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to