« Deploying JHeadstart applications to OC4J 10.1.3.2 or higher | Main | Supported Browsers for ADF Faces »

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!

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)