QeelwaEtech / omnifaces

Automatically exported from code.google.com/p/omnifaces
0 stars 1 forks source link

In a normal request, the exception is not caught by Omnifaces #171

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I´m working together with Oleg Varaksin in an project.
The "non-ajax" exceptions are not caught by Omnifaces Exceptionhandler. Thus, I 
reduce to the simplest case for testing:

Omnifaces 1.4.1
PF 3.5
Mojarra 2.1.17
Jboss 6 AS
Firefox 20.0.1 / IE 8 / IE 9

See Attached files (faces-config.xml, web.xml, testErrorPages.xhtml, 
errorPage.xhtml)

The point is:
-The omnifaces-showcases with the same libs, except 
omnifaces-1.5-SNAPSHOT-20130407.jar, is perfectly working in my server. However 
this test-webapp, shows the general server error 500 page.

I don't get any js error and is exactly the same in firefox
Any idea?

Original issue reported on code.google.com by PublicDinamicPi@gmail.com on 22 Apr 2013 at 2:18

Attachments:

GoogleCodeExporter commented 9 years ago
This is expected. The FullAjaxExceptionHandler handles exceptions on ajax 
requests only. For exceptions on normal requests, just use the standard web.xml 
error page mechanisms as you should already have when using 
FullAjaxExceptionHandler.

Note that you need FacesExceptionFilter in order to extract the root cause from 
a FacesException or ELException in order to properly utilize the web.xml error 
page mechanisms in case of JSF and EL exceptions: 
http://showcase.omnifaces.org/filters/FacesExceptionFilter

This was also explained once to Oleg before.

Original comment by balusc on 22 Apr 2013 at 2:20

GoogleCodeExporter commented 9 years ago
Ok Bauke, first of all, thanks.
I find this out:
-In our real project, I need CDI, therefore I have the file beans.xml.
-In this test-webapp, when I have this file into WEB-INF folder, an error in a 
normal request, is not caught. However, if I move this file to META-INF 
(workaround) then everything works.
So far, I have no idea why, and you?

Original comment by PublicDinamicPi@gmail.com on 23 Apr 2013 at 9:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Maybe the attached test-webapp.zip and last comment, help also to solve this 
issue:

http://code.google.com/p/omnifaces/issues/detail?id=42

Because also in omnifaces-showcase happend exactly the same when we add the 
file beans.xml to WEB-INF. The content of this file is just:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://docs.jboss.org/cdi/beans_1_0.xsd">

</beans>

However with JBoss 7.2 works, no matter where do I emplace such file.

Original comment by PublicDinamicPi@gmail.com on 23 Apr 2013 at 1:18