[jboss-jira] [JBoss JIRA] (AS7-5756) If metadata-complete not specified, filter-mappping fail

Andrew Bourgeois (JIRA) jira-events at lists.jboss.org
Mon Oct 15 19:47:01 EDT 2012


Andrew Bourgeois created AS7-5756:
-------------------------------------

             Summary: If metadata-complete not specified, filter-mappping fail
                 Key: AS7-5756
                 URL: https://issues.jboss.org/browse/AS7-5756
             Project: Application Server 7
          Issue Type: Bug
    Affects Versions: 7.1.1.Final
         Environment: CentOS 6.3
            Reporter: Andrew Bourgeois


web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 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://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <!-- Make sure that the rememberCookieFilter is executed before the mustBeSignedInFilter -->
    <filter-mapping>
        <filter-name>rememberCookieFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>mustBeSignedInFilter</filter-name>
        <url-pattern>/user/*</url-pattern>
    </filter-mapping>
</web-app>

Annotated filters:

@WebFilter(filterName="rememberCookieFilter")
public class RememberCookieFilter implements Filter
 
@WebFilter(filterName="mustBeSignedInFilter")
public class MustBeSignedInFilter implements Filter

Output when deploying:

21:10:50,160 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-4) Context [/webapp] startup failed due to previous errors: java.lang.IllegalArgumentException: Filter mapping specifies an unknown filter name rememberCookieFilter
          at org.apache.catalina.core.StandardContext.validateFilterMap(StandardContext.java:2040) [jbossweb-7.0.13.Final.jar:]
          at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:1996) [jbossweb-7.0.13.Final.jar:]
          at org.jboss.as.web.deployment.JBossContextConfig.processWebMetaData(JBossContextConfig.java:314) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
          at org.jboss.as.web.deployment.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:169) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
          at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:417) [jbossweb-7.0.13.Final.jar:]
          at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:182) [jbossweb-7.0.13.Final.jar:]
          at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:162) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.0.13.Final.jar:]
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3790) [jbossweb-7.0.13.Final.jar:]
          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]
          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]

The issue disappears when you add "metadata-complete="false"", which should be exactly the same as not specifying the attribute.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list