Ignore runtime warning AdfFacesFilter to avoid IllegalStateException

If you get an error

java.lang.IllegalStateException: AdfFacesContext was already released or had never been attached.

while the underlying error is something else, then check your web.xml. Do you have the following filter mapping?

    <filter-mapping>
        <filter-name>adfFaces</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>

Then remove or comment out this mapping. This results in seeing the original stack trace if a runtime problem occurs. However, it also means that you will get runtime warnings like

WARNING The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper execution.

If these warnings are caused only by removing this particular filter mapping, you can safely ignore them. You probably have filter mappings to the AdfFacesFilter for *.jsp and *.jspx, which takes care of applying the filter at the appropriate time. Having these runtime warnings is better than not seeing the underlying error in case of a problem!

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Java EE Consultants - JHeadstart, ADF, JSF

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today