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

Mario Buonopane commented on TOMAHAWK-1170:
-------------------------------------------

I alse have the same problem. I'm using version 1.1.5. 
My web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<!-- 
        Copyright 2006 The Apache Software Foundation.
        
        Licensed under the Apache License, Version 2.0 (the 
&quot;License&quot;);
        you may not use this file except in compliance with the License.
        You may obtain a copy of the License at
        
        http://www.apache.org/licenses/LICENSE-2.0
        
        Unless required by applicable law or agreed to in writing, software
        distributed under the License is distributed on an &quot;AS IS&quot; 
BASIS,
        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        See the License for the specific language governing permissions and
        limitations under the License.
        
        $Id: web.xml,v 1.3 2008/07/23 17:35:53 mbnpane Exp $
-->


<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee                     
          http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
        version="2.4">

        <!-- Display name for this application -->
        <display-name>Accenture Claims</display-name>

        <!-- ADD THIS LINES TO CONFIGURE ACEGI AUTHENTICATION -->
        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
                        /WEB-INF/applicationContext-acegi-security.xml
                </param-value>
        </context-param>

        <filter>
                <filter-name>Acegi Filter Chain Proxy</filter-name>
                <filter-class>
                        org.acegisecurity.util.FilterToBeanProxy
                </filter-class>
                <init-param>
                        <param-name>targetClass</param-name>
                        <param-value>
                                org.acegisecurity.util.FilterChainProxy
                        </param-value>
                </init-param>
        </filter>

        <filter-mapping>
                <filter-name>Acegi Filter Chain Proxy</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>

        <listener>
                <listener-class>
                        org.springframework.web.context.ContextLoaderListener
                </listener-class>
        </listener>

        <!-- *********************************************-->



        <!-- Select JSF State Saving Mode -->
        <context-param>
                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                <param-value>server</param-value>
        </context-param>

        <context-param>
                <description>
                        Only applicable if state saving method is 
&quot;server&quot;
                        (= default). Defines the amount (default = 20) of the 
latest
                        views are stored in session.
                </description>
                <param-name>
                        org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
                </param-name>
                <param-value>1</param-value>
        </context-param>

        <context-param>
                <description>
                        Only applicable if state saving method is 
&quot;server&quot;
                        (= default). If true (default) the state will be 
serialized
                        to a byte stream before it is written to the session. If
                        false the state will not be serialized to a byte stream.
                </description>
                <param-name>
                        org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
                </param-name>
                <param-value>false</param-value>
        </context-param>

        <context-param>
                <description>
                        Only applicable if state saving method is 
&quot;server&quot;
                        (= default) and if
                        org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
                        default) If true (default) the serialized state will be
                        compressed before it is written to the session. If 
false the
                        state will not be compressed.
                </description>
                <param-name>
                        org.apache.myfaces.COMPRESS_STATE_IN_SESSION
                </param-name>
                <param-value>false</param-value>
        </context-param>

        <!-- MyFaces Configuration Resources (comma-separated list) -->

        <context-param>
                <description>
                        This parameter tells MyFaces if javascript code should 
be
                        allowed in the rendered HTML output. If javascript is
                        allowed, command_link anchors will have javascript code 
that
                        submits the corresponding form. If javascript is not
                        allowed, the state saving info and nested parameters 
will be
                        added as url parameters. Default: &quot;true&quot;
                </description>
                <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
                <param-value>true</param-value>
        </context-param>
        <context-param>
                <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
                <param-value>false</param-value>
        </context-param>
        <context-param>
                <description>
                        If true, rendered HTML code will be formatted, so that 
it is
                        &quot;human readable&quot;. i.e. additional line 
separators
                        and whitespace will be written, that do not influence 
the
                        HTML code. Default: &quot;true&quot;
                </description>
                <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
                <param-value>true</param-value>
        </context-param>
        <context-param>
                <description>
                        If true, a javascript function will be rendered that is 
able
                        to restore the former vertical scroll on every request.
                        Convenient feature if you have pages with long lists 
and you
                        do not want the browser page to always jump to the top 
if
                        you trigger a link or button action that stays on the 
same
                        page. Default: &quot;false&quot;
                </description>
                <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
                <param-value>true</param-value>
        </context-param>

        <context-param>
                <description>
                        Validate managed beans, navigation rules and ensure that
                        forms are not nested.
                </description>
                <param-name>org.apache.myfaces.VALIDATE</param-name>
                <param-value>true</param-value>
        </context-param>

        <!-- JSF Configuration Resources (comma-separated list) -->
        <context-param>
                <param-name>javax.faces.CONFIG_FILES</param-name>
                <param-value>/WEB-INF/adf-faces-config.xml</param-value>
        </context-param>

        <!-- Commons Chain Configuration Resources -->
        <context-param>
                <param-name>
                        org.apache.commons.chain.CONFIG_WEB_RESOURCE
                </param-name>
                <param-value>/WEB-INF/chain-config.xml</param-value>
        </context-param>

        <!-- Tiles ViewHandler config file -->

        <context-param>
                <param-name>tiles-definitions</param-name>
                <param-value>/WEB-INF/tiles-config.xml</param-value>
        </context-param>


        <!-- Spring ApplicationContext Configuration (space separated list) -->
        <!--
                &lt;context-param&gt;
                &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
                
&lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
                &lt;/context-param&gt;
        -->

        <!-- Extensions Filter -->
        <filter>
                <filter-name>extensionsFilter</filter-name>
                <filter-class>
                        org.apache.myfaces.webapp.filter.ExtensionsFilter
                </filter-class>
                <init-param>
                        <param-name>uploadMaxFileSize</param-name>
                        <param-value>100m</param-value>
                </init-param>
                <init-param>
                        <param-name>uploadThresholdSize</param-name>
                        <param-value>100k</param-value>
                </init-param>
                <!--        &lt;init-param&gt;
                        
&lt;param-name&gt;uploadRepositoryPath&lt;/param-name&gt;
                        &lt;param-value&gt;/temp&lt;/param-value&gt;
                        &lt;description&gt;Set the path where the intermediary 
files will be stored.
                        &lt;/description&gt;
                        &lt;/init-param&gt;-->
        </filter>
        <!-- MyFaces Filter Mapping -->
        <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <url-pattern>*.jsf</url-pattern>
        </filter-mapping>
        <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <url-pattern>*.faces</url-pattern>
        </filter-mapping>
        <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <url-pattern>/faces/*</url-pattern>
        </filter-mapping>

        <filter>
                <display-name>RichFaces Filter</display-name>
                <filter-name>richfaces</filter-name>
                <filter-class>org.ajax4jsf.Filter</filter-class>
        </filter>
        <filter-mapping>
                <filter-name>richfaces</filter-name>
                <servlet-name>faces</servlet-name>
                <dispatcher>REQUEST</dispatcher>
                <dispatcher>FORWARD</dispatcher>
                <dispatcher>INCLUDE</dispatcher>
        </filter-mapping>

        <!-- Shale Application Controller Filter -->
        <filter>
                <filter-name>shale</filter-name>
                <filter-class>
                        
org.apache.shale.application.faces.ShaleApplicationFilter
                </filter-class>
        </filter>


        <!-- Shale Application Controller Filter Mapping -->
        <filter-mapping>
                <filter-name>shale</filter-name>
                <url-pattern>/*</url-pattern>
                <dispatcher>REQUEST</dispatcher>
                <dispatcher>FORWARD</dispatcher>
        </filter-mapping>

        <!-- Commons Chain Configuration Listener -->
        <listener>
                <listener-class>
                        org.apache.commons.chain.web.ChainListener
                </listener-class>
        </listener>


        <!-- JavaServer Faces Servlet Configuration -->
        <servlet>
                <servlet-name>faces</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
        </servlet>

        <!-- Tomahawk -->
        <servlet>
                <servlet-name>SourceCodeServlet</servlet-name>
                <servlet-class>
                        
org.apache.myfaces.shared_tomahawk.util.servlet.SourceCodeServlet
                </servlet-class>
        </servlet>

        <!-- JavaServer Faces Servlet Mapping -->
        <servlet-mapping>
                <servlet-name>faces</servlet-name>
                <url-pattern>*.faces</url-pattern>
        </servlet-mapping>

        <servlet-mapping>
                <servlet-name>faces</servlet-name>
                <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>

        <!-- Tomahawk Servlet Mapping -->
        <servlet-mapping>
                <servlet-name>SourceCodeServlet</servlet-name>
                <url-pattern>*.source</url-pattern>
        </servlet-mapping>

        <!-- Welcome File List -->
        <welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>

</web-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