[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631227#action_12631227
 ] 

Kennard Consulting commented on TOMAHAWK-1170:
----------------------------------------------

It's not intermittent.

If your main page is called, say, 'index.jsf' but that's protected in the 
web.xml by a <security-constraint>, then the filter won't fire via the JSP 
route (you'll get bounced to, say, login.jsf) but it WILL fire via the 
javax.faces.webapp.FacesServlet.service...

11:29:24,484 http-127.0.0.1-8080-1 WARN  [FormAuthenticator] Unexpected error 
forwarding to login page
java.lang.IllegalStateException: ExtensionsFilter not correctly configured. JSF 
mapping missing. JSF pages not covered. Please see: 
http://myfaces.apache.org/tomahawk/extensionsFilter.html
        at 
org.apache.myfaces.renderkit.html.util.AddResourceFactory.throwExtensionsFilterMissing(AddResourceFactory.java:389)
        at 
org.apache.myfaces.renderkit.html.util.AddResourceFactory.checkEnvironment(AddResourceFactory.java:349)
        at 
org.apache.myfaces.renderkit.html.util.AddResourceFactory.getInstance(AddResourceFactory.java:279)
        at 
org.apache.myfaces.webapp.filter.TomahawkFacesContextWrapper.<init>(TomahawkFacesContextWrapper.java:115)
        at 
org.apache.myfaces.webapp.filter.TomahawkFacesContextFactory.getFacesContext(TomahawkFacesContextFactory.java:85)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:260)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

...and it'll always fail.

This check is a nice idea, but it might be better off being a warning in the 
logs rather than a hard error that stops the entire app.


> Resource mapping missing / throwExtensionsFilterMissing reported incorrectly 
> under load
> ---------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1170
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1170
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: ExtensionsFilter
>    Affects Versions: 1.1.7-SNAPSHOT
>            Reporter: Simon Kitching
>
> It has been reported by two users that under load an application using 
> Tomahawk intermittently throws an exception claiming "resource mapping 
> missing".
> This message is meant to be thrown when a component in a request wants to 
> register stuff for the extensions filter to output, but the current request 
> never passed through the extensions filter. This is a sanity check to ensure 
> that people that misconfigure the ExtensionsFilter get a helpful error 
> message rather than just having tomahawk components that need additional 
> resources acting weirdly.
> A workaround is to disable this safety check. The first reporter of this 
> problem did disable the check and found the issue disappeared.
> The problem appears to be a race condition between multiple threads *reading* 
> a map; at least that was the only piece of code I found that had any obvious 
> thread race issues. I can't remember the exact piece of code for the moment, 
> but will update this issue when I find it again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to