0

I have defined an error-page in web.xml:

<error-page>
        <exception-type>java.lang.RuntimeException</exception-type>
        <location>/errorpage.xhtml</location>
</error-page>
<error-page>
    <error-code>500</error-code>
    <location>/errorpage.xhtml</location>
</error-page>
<error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/errorpage.xhtml</location>
</error-page>

but no redirect to errorpage.jsf is visible.

I see in the logfile:

UT005023: Exception handling request to /calculation/secure/adminPaper.jsf:

The exception here is for example

java.lang.RuntimeException: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.

need more information?

best regards

Heiko

Heiko Wiesner
  • 65
  • 3
  • 13
  • Are you sending Ajaxical requests? If not and you are not redirected to the configured error page then, try setting [the buffer size](http://stackoverflow.com/q/11768021/1391249) to a bigger value. – Tiny Feb 27 '15 at 15:39
  • 1
    You can add `filter` and react on **any** exception in your application (with redirection to error page) – Vasil Lukach Feb 27 '15 at 18:50
  • I increased the buffer size as in the other thread - but it did not help. I also have a template - but removing has no effect. Would it probably be better, to include the errorhandling in the template? – Heiko Wiesner Feb 28 '15 at 17:31
  • If the exception happens during an ajax request, JSF won't redirect to the error page. That's a tricky part of the framework which is fully covered by the Omnifaces auxiliar library, which offers a [full ajax exception handler](http://showcase.omnifaces.org/exceptionhandlers/FullAjaxExceptionHandler) for this cases. Anyway, it would be nice to know when are you getting this exception... – Aritz Mar 01 '15 at 10:53
  • The errors can occur in Ajax as also in non Ajax requests. I use Primefaces and don't want to use another framework for error handling. Another idea is to use the Primefaces errorhandler in my default template, but that also does not work. – Heiko Wiesner Mar 01 '15 at 17:44

0 Answers0